From f8fcfcbe1eb8b526aa8e81b3e8b8057b83eb5557 Mon Sep 17 00:00:00 2001 From: Lukas Riedel <34276446+peanutfun@users.noreply.github.com> Date: Thu, 19 Feb 2026 10:27:55 +0100 Subject: [PATCH 1/6] ci: Add job for Mamba installation --- .github/workflows/test-install.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/test-install.yml diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml new file mode 100644 index 0000000000..d0e6ac0d8a --- /dev/null +++ b/.github/workflows/test-install.yml @@ -0,0 +1,34 @@ +# Check if installation with conda/mamba works + +name: Install Test + +on: + schedule: + - cron: "0 6 * * *" + workflow_dispatch: + push: # TODO: Remove before merge! + +jobs: + install-conda: + name: Install from Conda + timeout-minutes: 10 + + strategy: + matrix: + fail-fast: false + python-version: ["3.10", "3.11", "3.12"] + os: [ubuntu-latest, windows-latest, macos-latest] + + runs-on: ${{ matrix.os }} + + steps: + - + name: Install with Mamba + uses: mamba-org/setup-micromamba@v2 + with: + environment-name: climada_env_${{ matrix.python-version }} + create-args: >- + python=${{ matrix.python-version }} + climada + cache-environment: false # Recompute environment for each run + cache-downloads: true From 2ff950b5a009660e4e35f9f1b7d702774a0c629b Mon Sep 17 00:00:00 2001 From: Lukas Riedel <34276446+peanutfun@users.noreply.github.com> Date: Thu, 19 Feb 2026 10:35:11 +0100 Subject: [PATCH 2/6] ci: Fix bug in test-install script --- .github/workflows/test-install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index d0e6ac0d8a..aa79cb3fed 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -14,8 +14,8 @@ jobs: timeout-minutes: 10 strategy: + fail-fast: false matrix: - fail-fast: false python-version: ["3.10", "3.11", "3.12"] os: [ubuntu-latest, windows-latest, macos-latest] From 4824b5c0e4b2825235475f46271402463571a7e7 Mon Sep 17 00:00:00 2001 From: Lukas Riedel <34276446+peanutfun@users.noreply.github.com> Date: Thu, 19 Feb 2026 10:48:28 +0100 Subject: [PATCH 3/6] ci: Try to import CLIMADA in the test-install job --- .github/workflows/test-install.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index aa79cb3fed..d3845f31af 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -30,5 +30,12 @@ jobs: create-args: >- python=${{ matrix.python-version }} climada - cache-environment: false # Recompute environment for each run + init-shell: bash powershell + # Recompute environment for each run, but possibly use cached downloads + cache-environment: false cache-downloads: true + cache-downloads-key: downloads-${{ matrix.os }}-py${{ matrix.python-version }} + + - + name: Import CLIMADA + run: python -c "import climada" From 5d5e18929502b8826971f54de96b7757ea922630 Mon Sep 17 00:00:00 2001 From: Lukas Riedel <34276446+peanutfun@users.noreply.github.com> Date: Thu, 19 Feb 2026 10:55:19 +0100 Subject: [PATCH 4/6] ci: Import CLIMADA in bash and powershell --- .github/workflows/test-install.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index d3845f31af..9c32729b2f 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -37,5 +37,11 @@ jobs: cache-downloads-key: downloads-${{ matrix.os }}-py${{ matrix.python-version }} - - name: Import CLIMADA + name: Import CLIMADA (bash) run: python -c "import climada" + shell: bash -el {0} + - + name: Import CLIMADA (powershell) + run: python -c "import climada" + shell: pwsh + if: ${{ matrix.os == 'windows-latest' }} From d29ff67902648e2978cdf8d6a3b981fa2e9689f1 Mon Sep 17 00:00:00 2001 From: Lukas Riedel <34276446+peanutfun@users.noreply.github.com> Date: Thu, 19 Feb 2026 13:24:51 +0100 Subject: [PATCH 5/6] ci: Try fixing unit test reports in ci.yml --- .github/workflows/ci.yml | 42 +++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59988c5327..24c3c07db7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,6 @@ jobs: name: 'Core / Unit Test Pipeline' runs-on: ubuntu-latest timeout-minutes: 20 - permissions: - # For publishing results - checks: write # Run this test for different Python versions strategy: @@ -53,21 +50,44 @@ jobs: run: | make unit_test - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - if: always() + name: Upload Test Reports + if: (!cancelled()) + uses: actions/upload-artifact@v6 with: - junit_files: tests_xml/tests.xml - check_name: "Core / Unit Test Results (${{ matrix.python-version }})" - comment_mode: "off" + name: test-results-python-${{ matrix.python-version }} + path: tests_xml/tests.xml - name: Upload Coverage Reports - if: always() - uses: actions/upload-artifact@v4 + if: (!cancelled()) + uses: actions/upload-artifact@v6 with: name: coverage-report-core-unittests-py${{ matrix.python-version }} path: coverage/ + publish-test-results: + name: "Tests Results" + needs: build-and-test + runs-on: ubuntu-latest + permissions: + # For publishing results + checks: write + + if: (!cancelled()) + steps: + - + name: Download Artifacts + uses: actions/download-artifact@v7 + with: + path: artifacts + pattern: test-results-python-* + - + name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + junit_files: artifacts/**/*.xml + check_name: "Core / Unit Test" + comment_mode: "off" + test-petals: name: Petals Compatibility uses: CLIMADA-project/climada_petals/.github/workflows/testing.yml@develop From 5384a48f4c2bfe6c5942042c82e459270b642613 Mon Sep 17 00:00:00 2001 From: Lukas Riedel <34276446+peanutfun@users.noreply.github.com> Date: Fri, 20 Feb 2026 09:06:38 +0100 Subject: [PATCH 6/6] Revert "ci: Try fixing unit test reports in ci.yml" This reverts commit d29ff67902648e2978cdf8d6a3b981fa2e9689f1. --- .github/workflows/ci.yml | 42 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24c3c07db7..59988c5327 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,9 @@ jobs: name: 'Core / Unit Test Pipeline' runs-on: ubuntu-latest timeout-minutes: 20 + permissions: + # For publishing results + checks: write # Run this test for different Python versions strategy: @@ -50,44 +53,21 @@ jobs: run: | make unit_test - - name: Upload Test Reports - if: (!cancelled()) - uses: actions/upload-artifact@v6 + name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() with: - name: test-results-python-${{ matrix.python-version }} - path: tests_xml/tests.xml + junit_files: tests_xml/tests.xml + check_name: "Core / Unit Test Results (${{ matrix.python-version }})" + comment_mode: "off" - name: Upload Coverage Reports - if: (!cancelled()) - uses: actions/upload-artifact@v6 + if: always() + uses: actions/upload-artifact@v4 with: name: coverage-report-core-unittests-py${{ matrix.python-version }} path: coverage/ - publish-test-results: - name: "Tests Results" - needs: build-and-test - runs-on: ubuntu-latest - permissions: - # For publishing results - checks: write - - if: (!cancelled()) - steps: - - - name: Download Artifacts - uses: actions/download-artifact@v7 - with: - path: artifacts - pattern: test-results-python-* - - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - with: - junit_files: artifacts/**/*.xml - check_name: "Core / Unit Test" - comment_mode: "off" - test-petals: name: Petals Compatibility uses: CLIMADA-project/climada_petals/.github/workflows/testing.yml@develop