From a095c8cf45b22b83f9264aa100550c75c1e0999e Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Wed, 20 May 2026 09:52:21 +0200 Subject: [PATCH] CI: Add verification CI job --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17e4e3e38..da190669e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -186,6 +186,62 @@ jobs: with: name: Flaky unittest report ${{ matrix.os }}-${{ matrix.pixi-environment }} path: ${{ env.COVERAGE_REPORT }} + validation-test: + name: "Validation tests | pixi run tests-validation" + runs-on: ubuntu-latest + needs: [cache-pixi-lock] + permissions: + contents: read + env: + COVERAGE_REPORT: "ubuntu_test_validation_test_report.html" + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Restore cached pixi lockfile + uses: Parcels-code/pixi-lock/restore@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0 + with: + cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }} + - uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0 + with: + pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }} + locked: false # TODO: Remove once v7 of the lock file is removed, or once we stop having external source dependencies https://github.com/Parcels-code/Parcels/pull/2550#issuecomment-4088660238 + cache: true + cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} + # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache + - name: Restore cached hypothesis directory + id: restore-hypothesis-cache + uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: .hypothesis/ + key: cache-hypothesis-${{ runner.os }}-${{ github.run_id }} + restore-keys: | + cache-hypothesis-${{ runner.os }}- + - name: Validation test + id: unit-test + run: | + pixi run tests-validation -v -s --cov=parcels --cov-report=xml --html="${COVERAGE_REPORT}" --self-contained-html + # explicitly save the cache so it gets updated, also do this even if it fails. + - name: Save cached hypothesis directory + id: save-hypothesis-cache + if: always() && steps.unit-test.outcome != 'skipped' + uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: .hypothesis/ + key: cache-hypothesis-${{ runner.os }}-${{ github.run_id }} + - name: Codecov + uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # zizmor: ignore[secrets-outside-env] + with: + flags: unit-tests + - name: Upload test results + if: ${{ always() }} # Always run this step, even if tests fail + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: Validation test report ubuntu-test + path: ${{ env.COVERAGE_REPORT }} + integration-test: name: "Integration: ${{ matrix.os }} | pixi run -e ${{ matrix.pixi-environment }} tests-notebooks" runs-on: ${{ matrix.os }}-latest