Repository navigation
CI(deps): Update ruff to v0.17.3 (main) #22747
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: OSGeo4W | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - releasebranch_* | |
| pull_request: | |
| permissions: {} | |
| jobs: | |
| build: | |
| name: ${{ matrix.os }} build and tests | |
| concurrency: | |
| group: >- | |
| ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{ | |
| matrix.os }} | |
| cancel-in-progress: true | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| PYTHONWARNINGS: always | |
| strategy: | |
| matrix: | |
| os: | |
| - windows-2022 | |
| fail-fast: false | |
| steps: | |
| - name: Set git to use LF | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: msys2/setup-msys2@ec48f7c5447b3140e2b088413ae3a55687bccb6e # v2.33.0 | |
| id: msys2 | |
| with: | |
| path-type: inherit | |
| location: D:\ | |
| update: true | |
| msystem: MINGW64 | |
| install: >- | |
| bison | |
| diffutils | |
| dos2unix | |
| flex | |
| git | |
| libintl | |
| make | |
| tar | |
| zip | |
| pacboy: >- | |
| bzip2 | |
| ccache | |
| fftw | |
| gcc | |
| gettext | |
| libiconv | |
| libsystre | |
| libtre | |
| libwinpthread-git | |
| openblas | |
| pcre | |
| pkgconf | |
| toolchain | |
| zlib | |
| - name: Setup OSGeo4W environment | |
| uses: echoix/setup-OSGeo4W@1e711832882e03603e9013181a87885b10af8a98 # v0.3.0 | |
| id: osgeo4w | |
| with: | |
| package-dir: "D:/OSGeo4W_pkg" | |
| packages: | | |
| cairo-devel | |
| freetype-devel | |
| gdal-devel | |
| geos-devel | |
| libjpeg-turbo-devel | |
| liblas-devel | |
| libpng-devel | |
| libpq-devel | |
| libtiff-devel | |
| netcdf-devel | |
| proj-devel | |
| python3-core | |
| python3-gdal | |
| python3-jupyter | |
| python3-matplotlib | |
| python3-numpy | |
| python3-pip | |
| python3-pywin32 | |
| python3-wxpython | |
| sqlite3-devel | |
| zstd-devel | |
| - name: Set number of cores for compilation | |
| run: | | |
| echo "MAKEFLAGS=-j$(nproc)" >> "${GITHUB_ENV}" | |
| shell: msys2 {0} | |
| - name: Compile GRASS | |
| shell: msys2 {0} | |
| run: | | |
| .github/workflows/build_osgeo4w.sh | |
| env: | |
| MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }} | |
| - name: Print installed versions | |
| if: always() | |
| shell: msys2 {0} | |
| run: .github/workflows/print_versions.sh | |
| - name: Test executing of the grass command | |
| run: .github/workflows/test_simple.bat '%O4WROOT%\opt\grass\grass86.bat' | |
| env: | |
| O4WROOT: ${{ steps.osgeo4w.outputs.root }} | |
| - name: Test executing of the grass command in bash | |
| shell: msys2 {0} | |
| run: .github/workflows/test_simple.sh | |
| - name: Install additional python packages | |
| run: | | |
| python -m pip install ^ | |
| pytest ^ | |
| 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 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 ^ | |
| @.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] | |
| - name: Run pytest with a single worker (for gunittest-based tests) | |
| run: | | |
| call %OSGEO4W_ROOT%\opt\grass\etc\env.bat | |
| set PYTHONPATH=%GISBASE%\etc\python;%PYTHONPATH% | |
| path %GISBASE%\lib;%GISBASE%\bin;%PATH%;%OSGEO4W_ROOT%\opt\grass | |
| pytest ^ | |
| @.github/workflows/pytest_args_ci.txt ^ | |
| @.github/workflows/pytest_args_deselect.txt ^ | |
| @.github/workflows/pytest_args_gunittest.txt ^ | |
| --junitxml=pytest.gunittest.junit.xml | |
| # 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 for the grass.lib loading tests standalone | |
| run: | | |
| call %OSGEO4W_ROOT%\opt\grass\etc\env.bat | |
| set PYTHONPATH=%GISBASE%\etc\python;%PYTHONPATH% | |
| REM The library directory is deliberately not added to PATH here: | |
| REM the tests provide their own environment, so this pins what | |
| REM works without the setup done by the other steps. | |
| pytest ^ | |
| python/grass/script/tests/grass_script_setup_lib_loading_test.py ^ | |
| python/grass/app/tests/grass_app_runtime_lib_loading_test.py ^ | |
| --junitxml=pytest.lib_loading.junit.xml | |
| # 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: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 | |
| with: | |
| exclude: gui | |
| flags: ${{ matrix.os }}-pytest-python | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| report_type: test_results | |
| - name: Run tests | |
| run: .github/workflows/test_thorough.bat '%O4WROOT%\opt\grass\grass86.bat' '%O4WROOT%\bin\python3' | |
| env: | |
| O4WROOT: ${{ steps.osgeo4w.outputs.root }} | |
| - name: Make HTML test report available | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: testreport-${{ matrix.os }} | |
| path: testreport | |
| retention-days: 3 |