|
20 | 20 | PIXI_VERSION: "v0.63.0" |
21 | 21 |
|
22 | 22 | jobs: |
| 23 | + should-skip-ci: |
| 24 | + name: should skip ci |
| 25 | + runs-on: ubuntu-latest |
| 26 | + if: | |
| 27 | + github.repository == 'Parcels-code/Parcels' |
| 28 | + && (github.event_name == 'push' || github.event_name == 'pull_request') |
| 29 | + outputs: |
| 30 | + value: ${{ steps.check-skip.outputs.trigger-found == 'true' || contains(github.event.pull_request.labels.*.name, 'skip-ci') }} |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v5 |
| 33 | + with: |
| 34 | + fetch-depth: 2 |
| 35 | + - uses: xarray-contrib/ci-trigger@v1 |
| 36 | + id: check-skip |
| 37 | + with: |
| 38 | + keyword: "[skip-ci]" |
| 39 | + |
23 | 40 | cache-pixi-lock: |
24 | 41 | uses: ./.github/workflows/cache-pixi-lock.yml |
25 | 42 | with: |
26 | 43 | pixi-version: "v0.62.2" # keep in sync with env var above |
27 | 44 | unit-test: |
28 | 45 | name: "Unit tests: ${{ matrix.os }} | pixi run -e ${{ matrix.pixi-environment }} tests" |
29 | 46 | runs-on: ${{ matrix.os }}-latest |
30 | | - needs: [cache-pixi-lock] |
| 47 | + needs: [should-skip-ci, cache-pixi-lock] |
| 48 | + if: needs.should-skip-ci.outputs.value == 'false' |
31 | 49 | env: |
32 | 50 | COVERAGE_REPORT: "${{ matrix.os }}_${{ matrix.pixi-environment }}_unit_test_report.html" |
33 | 51 | strategy: |
@@ -91,11 +109,12 @@ jobs: |
91 | 109 | name: Unittest report ${{ matrix.os }}-${{ matrix.pixi-environment }} |
92 | 110 | path: ${{ env.COVERAGE_REPORT }} |
93 | 111 | integration-test: |
94 | | - # TODO v4: Re-enable the workflow once development has stabilized and we want to run integration tests again |
95 | | - if: false |
96 | 112 | name: "Integration: ${{ matrix.os }} | pixi run -e ${{ matrix.pixi-environment }} tests-notebooks" |
97 | 113 | runs-on: ${{ matrix.os }}-latest |
98 | | - needs: [cache-pixi-lock] |
| 114 | + needs: [should-skip-ci, cache-pixi-lock] |
| 115 | + # TODO v4: Re-enable the workflow once development has stabilized and we want to run integration tests again |
| 116 | + # needs.should-skip-ci.outputs.value == 'false' |
| 117 | + if: false |
99 | 118 | env: |
100 | 119 | COVERAGE_REPORT: "${{ matrix.os }}_${{ matrix.pixi-environment }}_integration_test_report.html" |
101 | 120 | strategy: |
@@ -150,10 +169,11 @@ jobs: |
150 | 169 | pattern: "* report *" |
151 | 170 | typechecking: |
152 | 171 | name: "TypeChecking: pixi run typing" |
| 172 | + runs-on: ubuntu-latest |
| 173 | + needs: [should-skip-ci, cache-pixi-lock] |
153 | 174 | # TODO v4: Enable typechecking again |
| 175 | + # needs.should-skip-ci.outputs.value == 'false' |
154 | 176 | if: false |
155 | | - runs-on: ubuntu-latest |
156 | | - needs: [cache-pixi-lock] |
157 | 177 | steps: |
158 | 178 | - name: Checkout |
159 | 179 | uses: actions/checkout@v5 |
|
0 commit comments