Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,17 @@ jobs:
run: |
export PYTHONPATH=$(grass --config python_path):$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
pytest --verbose --color=yes --durations=0 --durations-min=0.5 \
--numprocesses auto \
-ra . \
-m 'not needs_solo_run'
pytest \
@.github/workflows/pytest_args_ci.txt \
@.github/workflows/pytest_args_parallel.txt
- name: Run pytest with a single worker (for tests marked with needs_solo_run)
shell: micromamba-shell {0}
run: |
export PYTHONPATH=$(grass --config python_path):$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
pytest --verbose --color=yes --durations=0 --durations-min=0.5 \
-ra . \
-m 'needs_solo_run'
pytest \
@.github/workflows/pytest_args_ci.txt \
@.github/workflows/pytest_args_not_parallel.txt

- name: Cache GRASS Sample Dataset
id: cached-data
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ jobs:
python3-numpy
python3-pip
python3-ply
python3-pytest
python3-pywin32
python3-six
python3-wxpython
Expand Down Expand Up @@ -120,17 +119,18 @@ jobs:
shell: msys2 {0}
run: .github/workflows/test_simple.sh

- name: Install pytest plugins
run: python -m pip install pytest-timeout
- name: Install additional python packages
run: |
python -m pip install ^
pytest ^
pytest-timeout
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}""
- name: Run pytest with a single worker
run: |
call %OSGEO4W_ROOT%\opt\grass\etc\env.bat
set PYTHONPATH=%GISBASE%\etc\python;%PYTHONPATH%
path %GISBASE%\lib;%GISBASE%\bin;%PATH%
pytest --verbose --color=yes ^
--durations=0 --durations-min=0.5 ^
-ra .
pytest @.github/workflows/pytest_args_ci.txt
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}""

- name: Run tests
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,21 @@ jobs:
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
export INITIAL_GISBASE="$(grass --config path)"
export INITIAL_PWD="${PWD}"
pytest --verbose --color=yes --durations=0 --durations-min=0.5 \
--numprocesses auto \
--cov \
--cov-context=test \
-ra . \
-m 'not needs_solo_run'
pytest \
@.github/workflows/pytest_args_ci.txt \
@.github/workflows/pytest_args_cov.txt \
@.github/workflows/pytest_args_parallel.txt

- name: Run pytest with a single worker (for tests marked with needs_solo_run)
run: |
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
export INITIAL_GISBASE="$(grass --config path)"
export INITIAL_PWD="${PWD}"
pytest --verbose --color=yes --durations=0 --durations-min=0.5 \
--cov \
--cov-context=test \
--cov-append \
-ra . \
-m 'needs_solo_run'
pytest \
@.github/workflows/pytest_args_ci.txt \
@.github/workflows/pytest_args_cov.txt \
@.github/workflows/pytest_args_not_parallel.txt
- name: Fix non-standard installed script paths in coverage data
run: |
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pytest_args_ci.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--verbose
--color=yes
--durations=0
--durations-min=0.5
-ra
3 changes: 3 additions & 0 deletions .github/workflows/pytest_args_cov.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--cov
--cov-context=test
--cov-append
1 change: 1 addition & 0 deletions .github/workflows/pytest_args_not_parallel.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-m needs_solo_run
2 changes: 2 additions & 0 deletions .github/workflows/pytest_args_parallel.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--numprocesses=auto
-m not needs_solo_run
Loading