Skip to content

Commit

Permalink
CI: Speed up pytest workflow with pytest-xdist (OSGeo#3257)
Browse files Browse the repository at this point in the history
* Use pytest-xdist in pytest.yml
* Add pip caching on pytest.yml
  • Loading branch information
echoix authored Nov 28, 2023
1 parent 843b41d commit 656add7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install non-Python dependencies
run: |
Expand All @@ -49,7 +50,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r .github/workflows/python_requirements.txt
pip install -r .github/workflows/optional_requirements.txt
pip install pytest pytest-timeout pytest-github-actions-annotate-failures
pip install pytest pytest-timeout pytest-github-actions-annotate-failures pytest-xdist
- name: Create installation directory
run: |
Expand All @@ -73,7 +74,7 @@ jobs:
run: |
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$HOME/install/grass84/lib:$LD_LIBRARY_PATH
pytest .
pytest --numprocesses auto .
- name: Print installed versions
if: always()
Expand Down

0 comments on commit 656add7

Please sign in to comment.