From 024afdf29f9b029a59086f5dc8ac72c5a67e00a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:07:53 -0400 Subject: [PATCH 01/33] CI(macOS): Add Codecov upload step to macOS workflow --- .github/workflows/macos.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e9e693e57c3..cb5b40518b0 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -116,6 +116,14 @@ jobs: pytest \ @.github/workflows/pytest_args_gunittest.txt + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 + with: + verbose: true + flags: pytest,pytest-macos-14 + name: pytest-macos-14 + token: ${{ secrets.CODECOV_TOKEN }} + - name: Cache GRASS Sample Dataset id: cached-data uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 From d80d99709fad934560818aa7554dbf2a141fd9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:16:17 -0400 Subject: [PATCH 02/33] CI(macOS): Add pytest-cov to macOS workflow configuration --- .github/workflows/macos.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index cb5b40518b0..9a6b59c4afa 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -57,6 +57,7 @@ jobs: test_dependencies: | ipython pytest + pytest-cov pytest-github-actions-annotate-failures pytest-timeout pytest-xdist @@ -104,8 +105,11 @@ jobs: 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 \ @.github/workflows/pytest_args_ci.txt \ + @.github/workflows/pytest_args_cov.txt \ @.github/workflows/pytest_args_not_parallel.txt \ -k 'not testsuite' - name: Run pytest with a single worker (for gunittest-based tests) From 93f6ae68406374b8cb8900885e0bfb1d96fede84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:36:24 -0400 Subject: [PATCH 03/33] CI(macOS): Add script to fix coverage data paths --- .github/workflows/macos.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9a6b59c4afa..98970763144 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -119,7 +119,15 @@ jobs: export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH pytest \ @.github/workflows/pytest_args_gunittest.txt - + - name: Fix non-standard installed script paths in coverage data + 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}" + python utils/coverage_mapper.py + coverage combine + coverage html - name: Upload coverage reports to Codecov uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 with: From c76e37e2483a3e6502f40b88814d33c0d4c8325f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:50:33 -0400 Subject: [PATCH 04/33] install coverage --- .github/workflows/macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 98970763144..cb22d9105e2 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -57,6 +57,7 @@ jobs: test_dependencies: | ipython pytest + coverage pytest-cov pytest-github-actions-annotate-failures pytest-timeout From 145c6ce357eb8a0122becbe9163bd951677ddf7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:04:18 -0400 Subject: [PATCH 05/33] CI(macOS): Use micromamba-shell for coverage mapping --- .github/workflows/macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index cb22d9105e2..9c740e35839 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -121,6 +121,7 @@ jobs: pytest \ @.github/workflows/pytest_args_gunittest.txt - name: Fix non-standard installed script paths in coverage data + shell: micromamba-shell {0} run: | export PYTHONPATH=$(grass --config python_path):$PYTHONPATH export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH From d71c7767e745b0f8a9b0957e9871bea4d0ac5c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:19:44 -0400 Subject: [PATCH 06/33] Add artifact upload step for coverage report --- .github/workflows/macos.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9c740e35839..2f0231ca711 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -130,6 +130,14 @@ jobs: python utils/coverage_mapper.py coverage combine coverage html + - name: Make python-only code coverage test report available + if: ${{ !cancelled() }} + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: >- + python-codecoverage-report-${{ 'macos-14' }} + path: coverage_html_report + retention-days: 1 - name: Upload coverage reports to Codecov uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 with: From 991187d6e65f5d47ed9d831f1cb238647c1f1093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:44:54 -0400 Subject: [PATCH 07/33] CI(macOS): Create json coverage file to upload --- .github/workflows/macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2f0231ca711..07ddaf286bf 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -130,6 +130,7 @@ jobs: python utils/coverage_mapper.py coverage combine coverage html + coverage json - name: Make python-only code coverage test report available if: ${{ !cancelled() }} uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 From d7c83ebd25fe38f93f95d05b6d2137ef3314ed2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:55:12 -0400 Subject: [PATCH 08/33] Remove redundant flag from codecov upload --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 07ddaf286bf..9d6a2f2a7ac 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -143,7 +143,7 @@ jobs: uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 with: verbose: true - flags: pytest,pytest-macos-14 + flags: pytest-macos-14 name: pytest-macos-14 token: ${{ secrets.CODECOV_TOKEN }} From 04f549cbfccb1b7153018dde2dc898a2512d15ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 18 Apr 2025 19:55:12 -0400 Subject: [PATCH 09/33] CI(deps): Update codecov/codecov-action action to v5.4.3 --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9d6a2f2a7ac..9a33219fc9a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -140,7 +140,7 @@ jobs: path: coverage_html_report retention-days: 1 - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 + uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 with: verbose: true flags: pytest-macos-14 From 3971b2799b3ccb13f67c6550ebd90fd4f909ae11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 16:10:37 -0400 Subject: [PATCH 10/33] Apply updates for new runner and action version --- .github/workflows/macos.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index c18a71398e1..5729a18e59c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -136,8 +136,8 @@ jobs: - name: Fix non-standard installed script paths in coverage data shell: micromamba-shell {0} run: | - PYTHONPATH=$(grass --config python_path):$PYTHONPATH - LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH + PYTHONPATH="$(grass --config python_path):${PYTHONPATH}" + LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}" INITIAL_GISBASE="$(grass --config path)" INITIAL_PWD="${PWD}" export PYTHONPATH @@ -153,15 +153,15 @@ jobs: uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: >- - python-codecoverage-report-${{ 'macos-14' }} + python-codecoverage-report-${{ 'macos-15' }} path: coverage_html_report retention-days: 1 - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 + uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 with: verbose: true - flags: pytest-macos-14 - name: pytest-macos-14 + flags: pytest-macos-15 + name: pytest-macos-15 - name: Upload test results to Codecov if: ${{ !cancelled() }} From 4ef0bbd602854e21145cd05add565ebcb0738e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 16:12:34 -0400 Subject: [PATCH 11/33] Update macos.yml --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 5729a18e59c..78d43fdcd25 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -153,7 +153,7 @@ jobs: uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: >- - python-codecoverage-report-${{ 'macos-15' }} + python-codecoverage-report-macos path: coverage_html_report retention-days: 1 - name: Upload coverage reports to Codecov From 002d18c9f42f94e26cdc5d8f8286ecb66eab14aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 17:00:33 -0400 Subject: [PATCH 12/33] CI(macOS): Pre-download codecov cli --- .github/workflows/macos.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 78d43fdcd25..25584a3fbe5 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -156,9 +156,17 @@ jobs: python-codecoverage-report-macos path: coverage_html_report retention-days: 1 + - name: Pre-download codecov-cli + shell: micromamba-shell {0} + run: | + curl -Os https://cli.codecov.io/latest/macos/codecov + sudo chmod +x codecov + ./codecov --help + which codecov - name: Upload coverage reports to Codecov uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 with: + binary: codecov verbose: true flags: pytest-macos-15 name: pytest-macos-15 From c9401b4d164345929dd086db4712b8a51acc7c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 17:14:11 -0400 Subject: [PATCH 13/33] Hide exit code from codecov cli help as makes step fail --- .github/workflows/macos.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 25584a3fbe5..427963f6495 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -161,7 +161,9 @@ jobs: run: | curl -Os https://cli.codecov.io/latest/macos/codecov sudo chmod +x codecov - ./codecov --help + ./codecov --help || true + ./codecov --version || true + ./codecov --version which codecov - name: Upload coverage reports to Codecov uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 From 6a6fc2d669fdb6e1e5749cf576fe64cc852813fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 17:29:29 -0400 Subject: [PATCH 14/33] Update macos.yml --- .github/workflows/macos.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 427963f6495..4dd7af08509 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -163,7 +163,6 @@ jobs: sudo chmod +x codecov ./codecov --help || true ./codecov --version || true - ./codecov --version which codecov - name: Upload coverage reports to Codecov uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 From dcd9edf7a908cb518763fb2bba61c253baf5a5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 17:44:05 -0400 Subject: [PATCH 15/33] Update macos.yml --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4dd7af08509..d93ce3babb5 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -163,7 +163,7 @@ jobs: sudo chmod +x codecov ./codecov --help || true ./codecov --version || true - which codecov + which ./codecov - name: Upload coverage reports to Codecov uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 with: From a999fbe10c0a880d0d84da19d7fa53f37e6190cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 17:59:05 -0400 Subject: [PATCH 16/33] CI(macOS): Disable codecov-action, use codecov-cli with upload-process --- .github/workflows/macos.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d93ce3babb5..8d183ee62e1 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -164,7 +164,9 @@ jobs: ./codecov --help || true ./codecov --version || true which ./codecov + ./codecov upload-process - name: Upload coverage reports to Codecov + if: false uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 with: binary: codecov From bc54a18e4a78c1a6a8cf858527172067c2acb77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 18:23:30 -0400 Subject: [PATCH 17/33] Update Codecov upload process in macOS workflow --- .github/workflows/macos.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 8d183ee62e1..e7648f2eecf 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -164,7 +164,13 @@ jobs: ./codecov --help || true ./codecov --version || true which ./codecov - ./codecov upload-process + ./codecov --verbose upload-process \ + -t ${{ env.CODECOV_TOKEN }} \ + --auto-load-params-from github \ + --flag pytest-macos-15 \ + -f pytest-macos-15 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Upload coverage reports to Codecov if: false uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 From f4cecf0bcfe115401bf8a0a03addf3c3e6f0ac98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 18:37:44 -0400 Subject: [PATCH 18/33] Remove auto-load-params-from option in workflow --- .github/workflows/macos.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e7648f2eecf..80e8d83196f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -166,7 +166,6 @@ jobs: which ./codecov ./codecov --verbose upload-process \ -t ${{ env.CODECOV_TOKEN }} \ - --auto-load-params-from github \ --flag pytest-macos-15 \ -f pytest-macos-15 env: From a804b33bc7dd06814d6ee7f07907f19721c7a30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 20:13:26 -0400 Subject: [PATCH 19/33] Remove codecov-action for macOS --- .github/workflows/macos.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 80e8d83196f..d4c01a01449 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -156,7 +156,7 @@ jobs: python-codecoverage-report-macos path: coverage_html_report retention-days: 1 - - name: Pre-download codecov-cli + - name: Upload coverage reports to Codecov shell: micromamba-shell {0} run: | curl -Os https://cli.codecov.io/latest/macos/codecov @@ -170,14 +170,6 @@ jobs: -f pytest-macos-15 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: Upload coverage reports to Codecov - if: false - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 - with: - binary: codecov - verbose: true - flags: pytest-macos-15 - name: pytest-macos-15 - name: Upload test results to Codecov if: ${{ !cancelled() }} From 768d30034aa2c4636eb6ef4d8242be7c9b1cf10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 20:14:57 -0400 Subject: [PATCH 20/33] Clean up codecov cli step --- .github/workflows/macos.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d4c01a01449..a846eefd443 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -163,13 +163,10 @@ jobs: sudo chmod +x codecov ./codecov --help || true ./codecov --version || true - which ./codecov ./codecov --verbose upload-process \ - -t ${{ env.CODECOV_TOKEN }} \ - --flag pytest-macos-15 \ - -f pytest-macos-15 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + -t ${{ secrets.CODECOV_TOKEN }} \ + --flag pytest-macos \ + -f pytest-macos - name: Upload test results to Codecov if: ${{ !cancelled() }} From 73e0f42abf91376cf09decd35a3266c35e31e2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 9 Oct 2025 20:16:08 -0400 Subject: [PATCH 21/33] Upload test results to Codecov earlier --- .github/workflows/macos.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a846eefd443..e6f3801bfca 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -133,6 +133,13 @@ jobs: pytest \ @.github/workflows/pytest_args_gunittest.txt \ --junitxml=pytest.gunittest.junit.xml + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1 + with: + exclude: gui + flags: macos-pytest-python + token: ${{ secrets.CODECOV_TOKEN }} - name: Fix non-standard installed script paths in coverage data shell: micromamba-shell {0} run: | @@ -168,14 +175,6 @@ jobs: --flag pytest-macos \ -f pytest-macos - - name: Upload test results to Codecov - if: ${{ !cancelled() }} - uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1 - with: - exclude: gui - flags: macos-pytest-python - token: ${{ secrets.CODECOV_TOKEN }} - - name: Cache GRASS Sample Dataset id: cached-data uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 From c717ab2391abdf3f062d1c3844dae0940929fa0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 09:14:16 -0400 Subject: [PATCH 22/33] CI(macOS): Clone codecov-action and integrate local copy of action.yml to launch --- .github/workflows/macos.yml | 83 ++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e6f3801bfca..ac410d76583 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,6 +23,8 @@ jobs: runs-on: macos-15 env: PYTHONWARNINGS: always + # renovate: datasource=github-tags depName=codecov/codecov-action + CODECOV_ACTION_VERSION: "5a1091511ad55cbe89839c7260b706298ca349f7" # v5.5.1 steps: - name: Info run: | @@ -50,6 +52,16 @@ jobs: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: false + repository: codecov/codecov-action + ref: ${{ env.CODECOV_ACTION_VERSION }} + path: codecov-action + sparse-checkout: | + dist/codecov.sh + sparse-checkout-cone-mode: false + - name: Get current date cache key segment id: date # Year and week of year so cache key changes weekly @@ -163,17 +175,76 @@ jobs: python-codecoverage-report-macos path: coverage_html_report retention-days: 1 + - name: Set fork + shell: bash + run: | + CC_FORK="false" + if [ -n "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" ] && [ "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" != "$GITHUB_REPOSITORY" ]; + then + echo -e "\033[0;32m==>\033[0m Fork detected" + CC_FORK="true" + fi + echo "CC_FORK=$CC_FORK" >> "$GITHUB_ENV" + env: + GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }} + GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} + GITHUB_REPOSITORY: ${{ github.repository }} + - name: Override branch for forks + shell: bash + run: | + if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ "$CC_FORK" == 'true' ] + then + echo -e "\033[0;32m==>\033[0m Fork detected, setting branch to $GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL" + TOKENLESS="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL" + CC_BRANCH="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL" + echo "TOKENLESS=$TOKENLESS" >> "$GITHUB_ENV" + fi + + echo "CC_BRANCH=$CC_BRANCH" >> "$GITHUB_ENV" + env: + CC_BRANCH: #${{ inputs.override_branch }} + GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }} + GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} + GITHUB_REPOSITORY: ${{ github.repository }} + - name: Override commits and pr for pull requests + shell: bash + run: | + if [ -z "$CC_SHA" ]; + then + CC_SHA="$GITHUB_EVENT_PULL_REQUEST_HEAD_SHA" + fi + if [ -z "$CC_PR" ] && [ "$CC_FORK" == 'true' ]; + then + CC_PR="$GITHUB_EVENT_NUMBER" + fi + + echo "CC_SHA=$CC_SHA" >> "$GITHUB_ENV" + echo "CC_PR=$CC_PR" >> "$GITHUB_ENV" + env: + CC_PR: #${{ inputs.override_pr }} + CC_SHA: #${{ inputs.override_commit }} + GITHUB_EVENT_NAME: ${{ github.event_name }} + GITHUB_EVENT_NUMBER: ${{ github.event.number }} + GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }} - name: Upload coverage reports to Codecov shell: micromamba-shell {0} run: | - curl -Os https://cli.codecov.io/latest/macos/codecov - sudo chmod +x codecov - ./codecov --help || true - ./codecov --version || true - ./codecov --verbose upload-process \ - -t ${{ secrets.CODECOV_TOKEN }} \ + ./codecov-action/dist/codecov.sh --flag pytest-macos \ -f pytest-macos + #curl -Os https://cli.codecov.io/latest/macos/codecov + #sudo chmod +x codecov + #./codecov --help || true + #./codecov --version || true + #./codecov --verbose upload-process \ + # -t ${{ secrets.CODECOV_TOKEN }} \ + # --flag pytest-macos \ + # -f pytest-macos + env: + CC_TOKEN: ${{ secrets.CODECOV_TOKEN }} + CC_FLAGS: pytest-macos + CC_NAME: pytest-macos + - name: Cache GRASS Sample Dataset id: cached-data From e04827488292c8fdaaf2a276a929b227af5b7888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 09:14:59 -0400 Subject: [PATCH 23/33] Add gnupg to macOS workflow dependencies --- .github/workflows/macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ac410d76583..bf9bc2fa98f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -69,6 +69,7 @@ jobs: - name: Prepare Conda environment file env: test_dependencies: | + gnupg ipython pytest coverage From c0a79b4d75f0af4f449ec8b89a7117cde55a51c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 09:48:33 -0400 Subject: [PATCH 24/33] Update macOS workflow configuration file --- .github/workflows/macos.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index bf9bc2fa98f..63909bbe534 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -222,8 +222,8 @@ jobs: echo "CC_SHA=$CC_SHA" >> "$GITHUB_ENV" echo "CC_PR=$CC_PR" >> "$GITHUB_ENV" env: - CC_PR: #${{ inputs.override_pr }} - CC_SHA: #${{ inputs.override_commit }} + CC_PR: "" #${{ inputs.override_pr }} + CC_SHA: "" #${{ inputs.override_commit }} GITHUB_EVENT_NAME: ${{ github.event_name }} GITHUB_EVENT_NUMBER: ${{ github.event.number }} GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }} @@ -240,12 +240,11 @@ jobs: #./codecov --verbose upload-process \ # -t ${{ secrets.CODECOV_TOKEN }} \ # --flag pytest-macos \ - # -f pytest-macos + # -f pytest-macos env: CC_TOKEN: ${{ secrets.CODECOV_TOKEN }} CC_FLAGS: pytest-macos CC_NAME: pytest-macos - - name: Cache GRASS Sample Dataset id: cached-data From c4a0e258c2fc276bb4a28f2a656f8714d0c110cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 09:50:08 -0400 Subject: [PATCH 25/33] Try fixing syntax --- .github/workflows/macos.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 63909bbe534..6dd9c2aa69d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -222,8 +222,10 @@ jobs: echo "CC_SHA=$CC_SHA" >> "$GITHUB_ENV" echo "CC_PR=$CC_PR" >> "$GITHUB_ENV" env: - CC_PR: "" #${{ inputs.override_pr }} - CC_SHA: "" #${{ inputs.override_commit }} + CC_PR: "" + #${{ inputs.override_pr }} + CC_SHA: "" + #${{ inputs.override_commit }} GITHUB_EVENT_NAME: ${{ github.event_name }} GITHUB_EVENT_NUMBER: ${{ github.event.number }} GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }} From 11eec5e370cb13906651584cf495c861ac758e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 09:52:12 -0400 Subject: [PATCH 26/33] Try fixing syntax again --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 6dd9c2aa69d..e6cd0deac2a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -203,7 +203,7 @@ jobs: echo "CC_BRANCH=$CC_BRANCH" >> "$GITHUB_ENV" env: - CC_BRANCH: #${{ inputs.override_branch }} + CC_BRANCH: "" #${{ inputs.override_branch }} GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }} GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} GITHUB_REPOSITORY: ${{ github.repository }} From 425d8f4011bdfe9709ff02bf66451f9c99e77908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:00:25 -0400 Subject: [PATCH 27/33] Remove redundant Codecov flags from macOS workflow --- .github/workflows/macos.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e6cd0deac2a..cd37a37aef6 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -233,8 +233,6 @@ jobs: shell: micromamba-shell {0} run: | ./codecov-action/dist/codecov.sh - --flag pytest-macos \ - -f pytest-macos #curl -Os https://cli.codecov.io/latest/macos/codecov #sudo chmod +x codecov #./codecov --help || true From f34e6a5d3dc165f869abab7479e6195ddad4afe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:03:00 -0400 Subject: [PATCH 28/33] Fix indent --- .github/workflows/macos.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index cd37a37aef6..a551e684690 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -222,10 +222,8 @@ jobs: echo "CC_SHA=$CC_SHA" >> "$GITHUB_ENV" echo "CC_PR=$CC_PR" >> "$GITHUB_ENV" env: - CC_PR: "" - #${{ inputs.override_pr }} - CC_SHA: "" - #${{ inputs.override_commit }} + #CC_PR: #${{ inputs.override_pr }} + #CC_SHA: "" #${{ inputs.override_commit }} GITHUB_EVENT_NAME: ${{ github.event_name }} GITHUB_EVENT_NUMBER: ${{ github.event.number }} GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }} @@ -241,10 +239,10 @@ jobs: # -t ${{ secrets.CODECOV_TOKEN }} \ # --flag pytest-macos \ # -f pytest-macos - env: - CC_TOKEN: ${{ secrets.CODECOV_TOKEN }} - CC_FLAGS: pytest-macos - CC_NAME: pytest-macos + env: + CC_TOKEN: ${{ secrets.CODECOV_TOKEN }} + CC_FLAGS: pytest-macos + CC_NAME: pytest-macos - name: Cache GRASS Sample Dataset id: cached-data From 3aeea067420ba9ee36960aa30683cc4924d4c63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:49:05 -0400 Subject: [PATCH 29/33] clean codecov action --- .github/workflows/macos.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a551e684690..87d34f10e00 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -203,7 +203,7 @@ jobs: echo "CC_BRANCH=$CC_BRANCH" >> "$GITHUB_ENV" env: - CC_BRANCH: "" #${{ inputs.override_branch }} + #CC_BRANCH: ${{ inputs.override_branch }} GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }} GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} GITHUB_REPOSITORY: ${{ github.repository }} @@ -222,8 +222,8 @@ jobs: echo "CC_SHA=$CC_SHA" >> "$GITHUB_ENV" echo "CC_PR=$CC_PR" >> "$GITHUB_ENV" env: - #CC_PR: #${{ inputs.override_pr }} - #CC_SHA: "" #${{ inputs.override_commit }} + #CC_PR: ${{ inputs.override_pr }} + #CC_SHA: ${{ inputs.override_commit }} GITHUB_EVENT_NAME: ${{ github.event_name }} GITHUB_EVENT_NUMBER: ${{ github.event.number }} GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }} From 81eba98e1fdfcb489e5cc0116860ee5c79045629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 12:42:26 -0400 Subject: [PATCH 30/33] Fix yamllint errors --- .github/workflows/macos.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 87d34f10e00..a2d256e1935 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -178,6 +178,7 @@ jobs: retention-days: 1 - name: Set fork shell: bash + # yamllint disable-line rule:line-length run: | CC_FORK="false" if [ -n "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" ] && [ "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" != "$GITHUB_REPOSITORY" ]; @@ -231,14 +232,15 @@ jobs: shell: micromamba-shell {0} run: | ./codecov-action/dist/codecov.sh - #curl -Os https://cli.codecov.io/latest/macos/codecov - #sudo chmod +x codecov - #./codecov --help || true - #./codecov --version || true - #./codecov --verbose upload-process \ - # -t ${{ secrets.CODECOV_TOKEN }} \ - # --flag pytest-macos \ - # -f pytest-macos + # Other approach + # curl -Os https://cli.codecov.io/latest/macos/codecov + # sudo chmod +x codecov + # ./codecov --help || true + # ./codecov --version || true + # ./codecov --verbose upload-process \ + # -t ${{ secrets.CODECOV_TOKEN }} \ + # --flag pytest-macos \ + # -f pytest-macos env: CC_TOKEN: ${{ secrets.CODECOV_TOKEN }} CC_FLAGS: pytest-macos From 3d3c495c28506d6581f8fd93bb04586bbba39cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:16:04 -0400 Subject: [PATCH 31/33] Update comment for yamllint in macos.yml --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a2d256e1935..aa5f93e6c51 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -178,9 +178,9 @@ jobs: retention-days: 1 - name: Set fork shell: bash - # yamllint disable-line rule:line-length run: | CC_FORK="false" + # yamllint disable-line rule:line-length if [ -n "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" ] && [ "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" != "$GITHUB_REPOSITORY" ]; then echo -e "\033[0;32m==>\033[0m Fork detected" From c68ef987466f7476baec246bba02fceb723b8046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:18:18 -0400 Subject: [PATCH 32/33] Add space after commented-out code --- .github/workflows/macos.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index aa5f93e6c51..6da42d7b56a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -204,7 +204,7 @@ jobs: echo "CC_BRANCH=$CC_BRANCH" >> "$GITHUB_ENV" env: - #CC_BRANCH: ${{ inputs.override_branch }} + # CC_BRANCH: ${{ inputs.override_branch }} GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }} GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} GITHUB_REPOSITORY: ${{ github.repository }} @@ -223,8 +223,8 @@ jobs: echo "CC_SHA=$CC_SHA" >> "$GITHUB_ENV" echo "CC_PR=$CC_PR" >> "$GITHUB_ENV" env: - #CC_PR: ${{ inputs.override_pr }} - #CC_SHA: ${{ inputs.override_commit }} + # CC_PR: ${{ inputs.override_pr }} + # CC_SHA: ${{ inputs.override_commit }} GITHUB_EVENT_NAME: ${{ github.event_name }} GITHUB_EVENT_NUMBER: ${{ github.event.number }} GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }} From d37e95ab4bda135e7cfe23ec3b183db13cf98c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:46:10 -0400 Subject: [PATCH 33/33] Disable line length check and reenable later Only using a next line comment wasn't working. --- .github/workflows/macos.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 6da42d7b56a..72ac5cb9691 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -176,11 +176,11 @@ jobs: python-codecoverage-report-macos path: coverage_html_report retention-days: 1 +# yamllint disable rule:line-length - name: Set fork - shell: bash + shell: bash run: | CC_FORK="false" - # yamllint disable-line rule:line-length if [ -n "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" ] && [ "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" != "$GITHUB_REPOSITORY" ]; then echo -e "\033[0;32m==>\033[0m Fork detected" @@ -191,6 +191,7 @@ jobs: GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }} GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} GITHUB_REPOSITORY: ${{ github.repository }} +# yamllint enable rule:line-length - name: Override branch for forks shell: bash run: |