2020 PIXI_VERSION : " v0.63.0"
2121
2222jobs :
23- should-skip -ci :
24- name : should skip ci
25- runs-on : ubuntu-latest
23+ should-run -ci :
24+ name : should run ci
25+ runs-on : ubuntu-slim
2626 if : |
2727 github.repository == 'Parcels-code/Parcels'
2828 && (github.event_name == 'push' || github.event_name == 'pull_request')
29- outputs :
30- value : ${{ steps.set-output.outputs.skip-ci }}
3129 steps :
3230 - uses : actions/checkout@v5
3331 with :
@@ -36,17 +34,15 @@ jobs:
3634 id : check-skip
3735 with :
3836 keyword : " [skip-ci]"
39- - name : Set skip-ci output
40- id : set-output
37+ - name : Decide if we skip CI
38+ if : steps.check-skip.outputs.trigger-found == 'true' || contains(github.event.pull_request.labels.*.name, 'skip-ci')
4139 run : |
42- echo 'steps.check-skip.outputs.trigger-found=${{steps.check-skip.outputs.trigger-found}}'
43- echo "github.event.pull_request.labels.*.name=${{toJson(github.event.pull_request.labels.*.name)}}"
44- SKIP_CI=${{ steps.check-skip.outputs.trigger-found == 'true' || contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
45- echo "skip-ci=${SKIP_CI}"
46- echo "skip-ci=${SKIP_CI}" >> $GITHUB_OUTPUT
40+ echo "Skipping CI."
41+ exit 1
4742
4843 cache-pixi-lock :
49- runs-on : ubuntu-latest
44+ runs-on : ubuntu-slim
45+ needs : [should-run-ci]
5046 outputs :
5147 cache-key : ${{ steps.pixi-lock.outputs.cache-key }}
5248 pixi-version : ${{ steps.pixi-lock.outputs.pixi-version }}
@@ -56,11 +52,15 @@ jobs:
5652 id : pixi-lock
5753 with :
5854 pixi-version : ${{env.PIXI_VERSION}}
55+ - uses : actions/upload-artifact@v6
56+ with :
57+ name : pixi-lock
58+ path : pixi.lock
59+
5960 unit-test :
6061 name : " Unit tests: ${{ matrix.os }} | pixi run -e ${{ matrix.pixi-environment }} tests"
6162 runs-on : ${{ matrix.os }}-latest
62- needs : [should-skip-ci, cache-pixi-lock]
63- if : needs.should-skip-ci.outputs.value == 'false'
63+ needs : [cache-pixi-lock]
6464 env :
6565 COVERAGE_REPORT : " ${{ matrix.os }}_${{ matrix.pixi-environment }}_unit_test_report.html"
6666 strategy :
@@ -122,9 +122,8 @@ jobs:
122122 integration-test :
123123 name : " Integration: ${{ matrix.os }} | pixi run -e ${{ matrix.pixi-environment }} tests-notebooks"
124124 runs-on : ${{ matrix.os }}-latest
125- needs : [should-skip-ci, cache-pixi-lock]
125+ needs : [cache-pixi-lock]
126126 # TODO v4: Re-enable the workflow once development has stabilized and we want to run integration tests again
127- # needs.should-skip-ci.outputs.value == 'false'
128127 if : false
129128 env :
130129 COVERAGE_REPORT : " ${{ matrix.os }}_${{ matrix.pixi-environment }}_integration_test_report.html"
@@ -177,9 +176,8 @@ jobs:
177176 typechecking :
178177 name : " TypeChecking: pixi run typing"
179178 runs-on : ubuntu-latest
180- needs : [should-skip-ci, cache-pixi-lock]
179+ needs : [cache-pixi-lock]
181180 # TODO v4: Enable typechecking again
182- # needs.should-skip-ci.outputs.value == 'false'
183181 if : false
184182 steps :
185183 - name : Checkout
0 commit comments