Skip to content

Commit

Permalink
Move parallel test execution from pyproj.toml to gh actions (#159)
Browse files Browse the repository at this point in the history
* Move parallel test execution from pyproj.toml to gh actions

The way this was set up, causes issues when pytest-xdist is not installed. Ill move that command to the CI only, so the user can just run the test using `pytest`.

Found by @TomNicholas

* Update ci.yaml
  • Loading branch information
jbusecke authored Jul 8, 2021
1 parent 9fad5d6 commit a9ca67d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: lscpu
- name: Run Tests
run: |
pytest --cov=./ --cov-report=xml --ignore=tests/test_preprocessing_cloud.py
pytest -n auto --cov=./ --cov-report=xml --ignore=tests/test_preprocessing_cloud.py
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
run: conda list
- name: Run Tests
run: |
pytest --ignore=tests/test_preprocessing_cloud.py
pytest -n auto --ignore=tests/test_preprocessing_cloud.py
cloud-tests:
needs: detect-ci-trigger
Expand Down Expand Up @@ -168,4 +168,4 @@ jobs:
run: |
pwd
echo $PYTHONPATH
pytest --reruns 1 --reruns-delay 5 tests/test_preprocessing_cloud.py --gl ${{ matrix.grid_label }} --ei ${{ matrix.experiment_id }} --vi ${{ matrix.variable_id }}
pytest -n auto --reruns 1 --reruns-delay 5 tests/test_preprocessing_cloud.py --gl ${{ matrix.grid_label }} --ei ${{ matrix.experiment_id }} --vi ${{ matrix.variable_id }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ known_third_party = ["cftime", "dask", "fsspec", "numpy", "pandas", "pkg_resourc

[tool.pytest.ini_options]
minversion = "6.0"
addopts = " -vv -rXfE -n auto"
addopts = " -vv -rXfE"
# only test the root level, otherwise it picks up the tests of the project template
testpaths = [
"tests",
Expand Down

0 comments on commit a9ca67d

Please sign in to comment.