@@ -122,54 +122,10 @@ on: # yamllint disable-line rule:truthy
122
122
permissions :
123
123
contents : read
124
124
jobs :
125
- install-prek :
126
- timeout-minutes : 5
127
- name : " Install prek for cache (only canary runs)"
128
- runs-on : ${{ fromJSON(inputs.runners) }}
129
- env :
130
- PYTHON_MAJOR_MINOR_VERSION : " ${{ inputs.default-python-version }}"
131
- if : inputs.basic-checks-only == 'false'
132
- steps :
133
- - name : " Cleanup repo"
134
- shell : bash
135
- run : docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
136
- if : inputs.canary-run == 'true'
137
- - name : " Checkout ${{ github.ref }} ( ${{ github.sha }} )"
138
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
139
- with :
140
- persist-credentials : false
141
- if : inputs.canary-run == 'true'
142
- - name : " Install Breeze"
143
- uses : ./.github/actions/breeze
144
- id : breeze
145
- if : inputs.canary-run == 'true'
146
- - name : " Install prek"
147
- uses : ./.github/actions/install-prek
148
- id : prek
149
- with :
150
- python-version : ${{steps.breeze.outputs.host-python-version}}
151
- platform : ${{ inputs.platform }}
152
- if : inputs.canary-run == 'true'
153
- - name : " Prepare .tar file from prek cache"
154
- run : |
155
- tar -C ~ -czf /tmp/cache-prek.tar.gz .cache/prek
156
- shell : bash
157
- if : inputs.canary-run == 'true'
158
- - name : " Save prek cache"
159
- uses : apache/infrastructure-actions/stash/save@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
160
- with :
161
- # yamllint disable rule:line-length
162
- key : cache-prek-v6-${{ inputs.platform }}-${{ steps.breeze.outputs.host-python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
163
- path : /tmp/cache-prek.tar.gz
164
- if-no-files-found : ' error'
165
- retention-days : ' 2'
166
- if : inputs.canary-run == 'true'
167
-
168
125
static-checks :
169
126
timeout-minutes : 45
170
127
name : " Static checks"
171
128
runs-on : ${{ fromJSON(inputs.runners) }}
172
- needs : install-prek
173
129
env :
174
130
PYTHON_MAJOR_MINOR_VERSION : " ${{ inputs.default-python-version }}"
175
131
UPGRADE_TO_NEWER_DEPENDENCIES : " ${{ inputs.upgrade-to-newer-dependencies }}"
@@ -196,6 +152,7 @@ jobs:
196
152
with :
197
153
python-version : ${{steps.breeze.outputs.host-python-version}}
198
154
platform : ${{ inputs.platform }}
155
+ save-cache : false
199
156
- name : " Static checks"
200
157
run : prek --all-files --show-diff-on-failure --color always
201
158
env :
@@ -210,7 +167,6 @@ jobs:
210
167
timeout-minutes : 45
211
168
name : " MyPy checks"
212
169
runs-on : ${{ fromJSON(inputs.runners) }}
213
- needs : install-prek
214
170
if : inputs.run-mypy == 'true'
215
171
strategy :
216
172
fail-fast : false
@@ -240,6 +196,7 @@ jobs:
240
196
with :
241
197
python-version : ${{steps.breeze.outputs.host-python-version}}
242
198
platform : ${{ inputs.platform }}
199
+ save-cache : false
243
200
- name : " MyPy checks for ${{ matrix.mypy-check }}"
244
201
run : prek --color always --verbose --hook-stage manual "$MYPY_CHECK" --all-files
245
202
env :
0 commit comments