diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48ac47341..df39ac2cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,23 @@ env: PIXI_VERSION: "v0.63.0" jobs: + should-skip-ci: + name: should skip ci + runs-on: ubuntu-latest + if: | + github.repository == 'Parcels-code/Parcels' + && (github.event_name == 'push' || github.event_name == 'pull_request') + outputs: + value: ${{ steps.check-skip.outputs.trigger-found == 'true' || contains(github.event.pull_request.labels.*.name, 'skip-ci') }} + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 2 + - uses: xarray-contrib/ci-trigger@v1 + id: check-skip + with: + keyword: "[skip-ci]" + cache-pixi-lock: uses: ./.github/workflows/cache-pixi-lock.yml with: @@ -27,7 +44,8 @@ jobs: unit-test: name: "Unit tests: ${{ matrix.os }} | pixi run -e ${{ matrix.pixi-environment }} tests" runs-on: ${{ matrix.os }}-latest - needs: [cache-pixi-lock] + needs: [should-skip-ci, cache-pixi-lock] + if: needs.should-skip-ci.outputs.value == 'false' env: COVERAGE_REPORT: "${{ matrix.os }}_${{ matrix.pixi-environment }}_unit_test_report.html" strategy: @@ -91,11 +109,12 @@ jobs: name: Unittest report ${{ matrix.os }}-${{ matrix.pixi-environment }} path: ${{ env.COVERAGE_REPORT }} integration-test: - # TODO v4: Re-enable the workflow once development has stabilized and we want to run integration tests again - if: false name: "Integration: ${{ matrix.os }} | pixi run -e ${{ matrix.pixi-environment }} tests-notebooks" runs-on: ${{ matrix.os }}-latest - needs: [cache-pixi-lock] + needs: [should-skip-ci, cache-pixi-lock] + # TODO v4: Re-enable the workflow once development has stabilized and we want to run integration tests again + # needs.should-skip-ci.outputs.value == 'false' + if: false env: COVERAGE_REPORT: "${{ matrix.os }}_${{ matrix.pixi-environment }}_integration_test_report.html" strategy: @@ -150,10 +169,11 @@ jobs: pattern: "* report *" typechecking: name: "TypeChecking: pixi run typing" + runs-on: ubuntu-latest + needs: [should-skip-ci, cache-pixi-lock] # TODO v4: Enable typechecking again + # needs.should-skip-ci.outputs.value == 'false' if: false - runs-on: ubuntu-latest - needs: [cache-pixi-lock] steps: - name: Checkout uses: actions/checkout@v5