Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6615f94
pytest: Require pytest 8.2
echoix Apr 13, 2025
dff36f0
pytest: allow collecting more test files
echoix Apr 13, 2025
e48051b
pytest: Ignore collecting files in `testsuite/data` folders
echoix Apr 13, 2025
b2ed394
pytest: Ignore running testsuite tests in normal runs
echoix Apr 13, 2025
47118b8
pytest: Run gunittest-based tests in a separate step in CI
echoix Apr 13, 2025
e596f6a
CI(pytest): refactor pytest arguments into a file
echoix Apr 13, 2025
07c4bf0
pytest: remove common arg from gunittest args
echoix Apr 13, 2025
054b84c
pytest: Deselect crashing tests that use ctypes functions directly an…
echoix Apr 13, 2025
3765c49
pytest: Extract gunittest deselect list to a separate arg file
echoix Apr 13, 2025
e8060f7
pytest: ignore deprecated python/grass/temporal/unit_tests.py
echoix Apr 13, 2025
c7d25f7
CI(pytest): Run gunittest-based tests without default report args
echoix Apr 13, 2025
d6a624d
CI(pytest): Show short traceback for gunittest-based tests
echoix Apr 13, 2025
1b482f6
CI(pytest): Reset report list at end of run
echoix Apr 13, 2025
5e6085c
CI(pytest): Only run passing gunittest-based tests
echoix Apr 13, 2025
1e01011
CI(OSGeo4w): Add folder of C:\OSGeo4W\opt\grass\grass85.bat to path f…
echoix Apr 19, 2025
b43620d
tests: Deselect non-fixed Windows test
echoix Apr 20, 2025
11a7f5b
CI(OSGeo4W): Use standard pytest args for running gunittest-based tes…
echoix Apr 20, 2025
6acc401
Merge branch 'main' into gunittest-pytest-already-working
echoix May 2, 2025
5bc3195
Deselect test_raster_metadata test in osgeo4w.yml
echoix May 2, 2025
1ec7ebd
chore: Format yaml and workflow files (#5543)
echoix May 6, 2025
89a831d
CQ: always include stdbool.h if bool is used in C code (#5618)
nilason May 6, 2025
3098f2f
Merge branch 'main' into gunittest-pytest-already-working
echoix May 6, 2025
a94ab42
Update osgeo4w.yml
echoix May 6, 2025
bbbf4c4
Apply https://github.com/ctypesgen/ctypesgen/pull/225
echoix May 7, 2025
7c7162b
ctypesgen: Add 'bool' to ctypes type map, needed for C23 (#5621)
nilason May 7, 2025
23e2c7f
r.proj: Add JSON support (#5549)
NishantBansal2003 May 7, 2025
a36b7a3
Update ctypedescs.py
echoix May 7, 2025
4f90110
Merge branch 'main' into gunittest-pytest-already-working
echoix May 7, 2025
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
2 changes: 1 addition & 1 deletion .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: CodeQL config
paths-ignore:
- '**/testsuite/**'
- "**/testsuite/**"
- bin.*
- dist.*
- node_modules
Expand Down
36 changes: 18 additions & 18 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ database:
- db/**
- lib/db/**
- scripts/db.*/**
- '**.sql'
- "**.sql"
display:
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -123,8 +123,8 @@ docker:
- changed-files:
- any-glob-to-any-file:
- docker/**
- '**/*Dockerfile*'
- '**/*dockerfile*'
- "**/*Dockerfile*"
- "**/*dockerfile*"
- .dockerignore
nix:
- changed-files:
Expand All @@ -140,17 +140,17 @@ docs:
- any-glob-to-any-file:
- doc/**
- man/**
- '**/*.md'
- '**/*.rst'
- '**/*.html'
- '**/*.dox'
- '**/*.png'
- '**.cff'
- "**/*.md"
- "**/*.rst"
- "**/*.html"
- "**/*.dox"
- "**/*.png"
- "**.cff"
- CITING
- AUTHORS
- TODO
- all-globs-to-all-files:
- '!doc/development/rfc/**'
- "!doc/development/rfc/**"
RFC:
- changed-files:
- any-glob-to-any-file:
Expand All @@ -163,29 +163,29 @@ translation:
Python:
- changed-files:
- any-glob-to-any-file:
- '**/*.py'
- '**/pyproject.toml'
- "**/*.py"
- "**/pyproject.toml"
notebook:
- changed-files:
- any-glob-to-any-file:
- '**/*.ipynb'
- "**/*.ipynb"
- doc/examples/notebooks/**
- python/grass/jupyter/**
C:
- changed-files:
- any-glob-to-any-file: '**/*.c'
- any-glob-to-any-file: "**/*.c"
C++:
- changed-files:
- any-glob-to-any-file: '**/*.cpp'
- any-glob-to-any-file: "**/*.cpp"
CSS:
- changed-files:
- any-glob-to-any-file: '**/*.css'
- any-glob-to-any-file: "**/*.css"
HTML:
- changed-files:
- any-glob-to-any-file: '**/*.html'
- any-glob-to-any-file: "**/*.html"
JavaScript:
- changed-files:
- any-glob-to-any-file: '**/*.js'
- any-glob-to-any-file: "**/*.js"
markdown:
- changed-files:
- any-glob-to-any-file:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.13'
python-version: "3.13"

- name: Check that files with the same content are the same
run: |
Expand Down
159 changes: 79 additions & 80 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,91 +2,90 @@
name: CMake

on:
push:
paths-ignore:
- 'doc/**'
branches:
- main
- releasebranch_*
pull_request:
paths-ignore:
- 'doc/**'
push:
paths-ignore:
- "doc/**"
branches:
- main
- releasebranch_*
pull_request:
paths-ignore:
- "doc/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

env:
CMAKE_UNITY_BUILD: OFF
CMAKE_UNITY_BUILD: OFF

permissions:
contents: read
contents: read

jobs:

build-cmake:
runs-on: ubuntu-22.04
env:
CMakeVersion: "3.22.0"
steps:
- name: Checkout GRASS
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install CMake
run: |
cd ${GITHUB_WORKSPACE}
arch=$(echo $(uname -s)-$(uname -m) | awk '{print tolower($0)}')
v=v${{ env.CMakeVersion }}/cmake-${{ env.CMakeVersion }}-${arch}.tar.gz
wget https://github.com/Kitware/CMake/releases/download/$v
tar xzf cmake-${{ env.CMakeVersion }}-${arch}.tar.gz
echo "CMAKE_DIR=$GITHUB_WORKSPACE/cmake-${{ env.CMakeVersion }}-${arch}/bin" >> $GITHUB_ENV
echo "$GITHUB_WORKSPACE/cmake-${{ env.CMakeVersion }}-${arch}/bin" >> $GITHUB_PATH
- run: |
cmake --version
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils ninja-build libpq-dev \
gettext unixodbc-dev libnetcdf-dev
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Print build environment variables
shell: bash -el {0}
run: |
printenv | sort
gcc --version
ldd --version
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Configure
run: |
cmake ${CMAKE_OPTIONS} -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -G Ninja \
-DCMAKE_INSTALL_PREFIX=$HOME/install -DWITH_NLS=ON -DWITH_GUI=OFF -DWITH_DOCS=OFF \
-DWITH_READLINE=ON -DWITH_ODBC=ON -DWITH_NETCDF=ON -DWITH_BZLIB=ON
- name: Print CMakeCache.txt
shell: bash -el {0}
run: |
cat ${GITHUB_WORKSPACE}/build/CMakeCache.txt
- name: Build
run: |
cmake --build build --verbose -j$(nproc)
- name: Install
run: |
cmake --install $GITHUB_WORKSPACE/build --verbose
- name: Add the bin directory to PATH
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Print installed versions
if: always()
run: .github/workflows/print_versions.sh
- name: Test executing of the grass command
run: .github/workflows/test_simple.sh
- name: Run tests
run: .github/workflows/test_thorough.sh --config .gunittest.cfg --min-success 98
- name: Make HTML test report available
if: ${{ !cancelled() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: testreport-CMake
path: testreport
retention-days: 3
build-cmake:
runs-on: ubuntu-22.04
env:
CMakeVersion: "3.22.0"
steps:
- name: Checkout GRASS
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install CMake
run: |
cd ${GITHUB_WORKSPACE}
arch=$(echo $(uname -s)-$(uname -m) | awk '{print tolower($0)}')
v=v${{ env.CMakeVersion }}/cmake-${{ env.CMakeVersion }}-${arch}.tar.gz
wget https://github.com/Kitware/CMake/releases/download/$v
tar xzf cmake-${{ env.CMakeVersion }}-${arch}.tar.gz
echo "CMAKE_DIR=$GITHUB_WORKSPACE/cmake-${{ env.CMakeVersion }}-${arch}/bin" >> $GITHUB_ENV
echo "$GITHUB_WORKSPACE/cmake-${{ env.CMakeVersion }}-${arch}/bin" >> $GITHUB_PATH
- run: |
cmake --version
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils ninja-build libpq-dev \
gettext unixodbc-dev libnetcdf-dev
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Print build environment variables
shell: bash -el {0}
run: |
printenv | sort
gcc --version
ldd --version
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Configure
run: |
cmake ${CMAKE_OPTIONS} -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -G Ninja \
-DCMAKE_INSTALL_PREFIX=$HOME/install -DWITH_NLS=ON -DWITH_GUI=OFF -DWITH_DOCS=OFF \
-DWITH_READLINE=ON -DWITH_ODBC=ON -DWITH_NETCDF=ON -DWITH_BZLIB=ON
- name: Print CMakeCache.txt
shell: bash -el {0}
run: |
cat ${GITHUB_WORKSPACE}/build/CMakeCache.txt
- name: Build
run: |
cmake --build build --verbose -j$(nproc)
- name: Install
run: |
cmake --install $GITHUB_WORKSPACE/build --verbose
- name: Add the bin directory to PATH
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Print installed versions
if: always()
run: .github/workflows/print_versions.sh
- name: Test executing of the grass command
run: .github/workflows/test_simple.sh
- name: Run tests
run: .github/workflows/test_thorough.sh --config .gunittest.cfg --min-success 98
- name: Make HTML test report available
if: ${{ !cancelled() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: testreport-CMake
path: testreport
retention-days: 3
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
- main
pull_request:
paths-ignore:
- '**/*.html'
- '**/*.md'
- '**/*.txt'
- "**/*.html"
- "**/*.md"
- "**/*.txt"
schedule:
# Check every Saturday at 18:36
- cron: 36 18 * * 6
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.x'
python-version: "3.x"
- name: Install non-Python dependencies
if: ${{ matrix.language == 'c-cpp' }}
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
name: ${{ matrix.c }} & ${{ matrix.cpp }}

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{
group: >-
${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{
matrix.c }}-${{ matrix.cpp }}
cancel-in-progress: true

Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,24 @@ jobs:
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
pytest \
@.github/workflows/pytest_args_ci.txt \
@.github/workflows/pytest_args_parallel.txt
@.github/workflows/pytest_args_parallel.txt \
-k 'not testsuite'
- 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 \
@.github/workflows/pytest_args_ci.txt \
@.github/workflows/pytest_args_not_parallel.txt
@.github/workflows/pytest_args_not_parallel.txt \
-k 'not testsuite'
- name: Run pytest with a single worker (for gunittest-based tests)
shell: micromamba-shell {0}
run: |
export PYTHONPATH=$(grass --config python_path):$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
pytest \
@.github/workflows/pytest_args_gunittest.txt

- name: Cache GRASS Sample Dataset
id: cached-data
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/macos_distribute_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- cron: "30 7 * * THU"
push:
tags:
- '**'
- "**"

permissions: {}

Expand All @@ -24,7 +24,8 @@ jobs:
if: ${{ github.repository == 'OSGeo/grass' }}

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{
group: >-
${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{
matrix.name }}-${{ matrix.os }}
cancel-in-progress: true

Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
name: ${{ matrix.os }} build and tests

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{
group: >-
${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{
matrix.os }}
cancel-in-progress: true

Expand Down Expand Up @@ -130,7 +131,20 @@ jobs:
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
pytest ^
@.github/workflows/pytest_args_ci.txt ^
-k "not testsuite"
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}""
- 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 ^
--deselect=lib/init/testsuite/test_grass_tmp_mapset.py
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}""

- name: Run tests
Expand Down
Loading
Loading