From 99b6eb363702987524b3759dbb898eba83d4182a Mon Sep 17 00:00:00 2001 From: maximilianvz Date: Mon, 5 Feb 2024 16:59:41 -0500 Subject: [PATCH 1/5] Add workflow to test code on commits/PRs --- .github/workflows/pytest.yaml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/pytest.yaml diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml new file mode 100644 index 00000000..3526c294 --- /dev/null +++ b/.github/workflows/pytest.yaml @@ -0,0 +1,48 @@ +name: pytest + +on: + push: + branches: + - main + tags-ignore: + - '**' + pull_request: + +jobs: + tests: + name: "Python ${{ matrix.py }} on OS ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: ["ubuntu-latest", "windows-latest"] + py: ["3.7", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: "actions/checkout@v3" + + - name: Setup python for test ${{ matrix.py }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.py }} + + - name: Install dependencies for testing + run: | + pip install --upgrade pip + pip install pytest pytest-md pytest-emoji pytest-cov + pip install qc-iodata + pip install git+https://github.com/theochem/gbasis.git@master + pip install git+https://github.com/theochem/grid.git@master + + - name: Install development version + run: | + pip install . + + - name: Run pytest + uses: pavelzw/pytest-action@v2 + with: + verbose: true + emoji: true + job-summary: true + click-to-expand: true + report-title: 'Test Report' \ No newline at end of file From ff28b33c3ecba82605164d202f4abd79c9204b64 Mon Sep 17 00:00:00 2001 From: maximilianvz Date: Mon, 5 Feb 2024 17:04:36 -0500 Subject: [PATCH 2/5] Fix indentation error --- .github/workflows/pytest.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 3526c294..b1b372b5 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -39,10 +39,10 @@ jobs: pip install . - name: Run pytest - uses: pavelzw/pytest-action@v2 - with: - verbose: true - emoji: true - job-summary: true - click-to-expand: true - report-title: 'Test Report' \ No newline at end of file + uses: pavelzw/pytest-action@v2 + with: + verbose: true + emoji: true + job-summary: true + click-to-expand: true + report-title: 'Test Report' \ No newline at end of file From c5875fb787a01ad9ed400e48fa57b27f17fc6820 Mon Sep 17 00:00:00 2001 From: maximilianvz Date: Mon, 5 Feb 2024 17:12:13 -0500 Subject: [PATCH 3/5] Change main to master --- .github/workflows/pytest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index b1b372b5..eb5418b1 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -3,7 +3,7 @@ name: pytest on: push: branches: - - main + - master tags-ignore: - '**' pull_request: From ae4d8a287a5cba3f5ce0217743526205e8487c36 Mon Sep 17 00:00:00 2001 From: Max van Zyl Date: Mon, 5 Feb 2024 18:56:27 -0500 Subject: [PATCH 4/5] Update pytest.yaml --- .github/workflows/pytest.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index eb5418b1..f05eac1b 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -36,7 +36,7 @@ jobs: - name: Install development version run: | - pip install . + pip install -v . - name: Run pytest uses: pavelzw/pytest-action@v2 @@ -45,4 +45,4 @@ jobs: emoji: true job-summary: true click-to-expand: true - report-title: 'Test Report' \ No newline at end of file + report-title: 'Test Report' From df8687ba27903bf80a727d29241fd2d8c45f4f12 Mon Sep 17 00:00:00 2001 From: Max van Zyl Date: Mon, 5 Feb 2024 19:43:52 -0500 Subject: [PATCH 5/5] Change Python versions and iodata installation `distutils` was removed from Python 3.12. It appears as though there is some problem installing IOData with `pip install qc-iodata` on Windows OS. --- .github/workflows/pytest.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index f05eac1b..09b92e53 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "windows-latest"] - py: ["3.7", "3.9", "3.10", "3.11", "3.12"] + py: ["3.7", "3.9", "3.10", "3.11"] steps: - uses: "actions/checkout@v3" @@ -30,9 +30,9 @@ jobs: run: | pip install --upgrade pip pip install pytest pytest-md pytest-emoji pytest-cov - pip install qc-iodata pip install git+https://github.com/theochem/gbasis.git@master pip install git+https://github.com/theochem/grid.git@master + pip install git+https://github.com/theochem/iodata.git@master - name: Install development version run: |