diff --git a/.github/workflows/osgeo4w.yml b/.github/workflows/osgeo4w.yml index 1d93df3fae7..96b5a6bb9aa 100644 --- a/.github/workflows/osgeo4w.yml +++ b/.github/workflows/osgeo4w.yml @@ -128,17 +128,34 @@ jobs: run: | python -m pip install ^ pytest ^ - pytest-timeout + pytest-timeout ^ + pytest-xdist ^ + pytest-randomly # Obfuscated usage of GitHub Actions features, Windows CMD shell limits analysis shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" # zizmor: ignore[misfeature] - - name: Run pytest with a single worker + - name: Run pytest with multiple workers in parallel run: | call %OSGEO4W_ROOT%\opt\grass\etc\env.bat set PYTHONPATH=%GISBASE%\etc\python;%PYTHONPATH% path %GISBASE%\lib;%GISBASE%\bin;%PATH% pytest ^ @.github/workflows/pytest_args_ci.txt ^ - --junitxml=pytest.junit.xml ^ + @.github/workflows/pytest_args_parallel.txt ^ + --junitxml=pytest.xdist.junit.xml ^ + -k "not testsuite" + env: + OMP_NUM_THREADS: 1 + # Obfuscated usage of GitHub Actions features, Windows CMD shell limits analysis + shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" # zizmor: ignore[misfeature] + - name: Run pytest with a single worker (for tests marked with needs_solo_run) + run: | + call %OSGEO4W_ROOT%\opt\grass\etc\env.bat + set PYTHONPATH=%GISBASE%\etc\python;%PYTHONPATH% + path %GISBASE%\lib;%GISBASE%\bin;%PATH% + pytest ^ + @.github/workflows/pytest_args_ci.txt ^ + @.github/workflows/pytest_args_not_parallel.txt ^ + --junitxml=pytest.needs_solo_run.junit.xml ^ -k "not testsuite" # Obfuscated usage of GitHub Actions features, Windows CMD shell limits analysis shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" # zizmor: ignore[misfeature]