Skip to content

Commit

Permalink
ci: improve test workflow performance (#333)
Browse files Browse the repository at this point in the history
* ci: speed up by using uv to install python packages

* ci: run tests in parallel using pytest-xdist
  • Loading branch information
afuetterer authored Jul 24, 2024
1 parent 9249ef1 commit af63cdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ jobs:

- name: Install package and dependencies
run: |
python -m pip install "$(ls dist/*.whl)[dev,solvers]"
python -m pip install uv
uv pip install --system "$(ls dist/*.whl)[dev,solvers]"
- name: Test with pytest
env:
MOSEKLM_LICENSE_FILE: ${{ secrets.MSK_LICENSE }}
run: |
pytest --cov=./ --cov-report=xml linopy --doctest-modules test
pytest --cov=./ --cov-report=xml linopy --doctest-modules test --numprocesses=auto --dist=loadscope
- name: Upload code coverage report
if: matrix.os == 'ubuntu-latest'
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ docs = [
dev = [
"pytest",
"pytest-cov",
"pytest-xdist",
"netcdf4",
"pre-commit",
"paramiko",
Expand Down

0 comments on commit af63cdd

Please sign in to comment.