4141 runs-on : ${{ matrix.os }}
4242
4343 steps :
44+ - name : Setup Git
45+ uses :
frequenz-floss/[email protected] 46+
4447 - name : Print environment (debug)
4548 run : env
4649
@@ -88,10 +91,14 @@ jobs:
8891 # The job name should match the name of the `nox` job.
8992 name : Test with nox
9093 needs : ["nox"]
94+ # We skip this job only if nox was also skipped
95+ if : always() && needs.nox.result != 'skipped'
9196 runs-on : ubuntu-20.04
97+ env :
98+ DEPS_RESULT : ${{ needs.nox.result }}
9299 steps :
93- - name : Return true
94- run : " true "
100+ - name : Check matrix job result
101+ run : test "$DEPS_RESULT" = "success "
95102
96103 nox-cross-arch :
97104 name : Cross-arch tests with nox
@@ -115,6 +122,9 @@ jobs:
115122 runs-on : ${{ matrix.os }}
116123
117124 steps :
125+ - name : Setup Git
126+ uses :
frequenz-floss/[email protected] 127+
118128 - name : Fetch sources
119129 uses : actions/checkout@v4
120130 with :
@@ -161,7 +171,7 @@ jobs:
161171 uses : actions/cache@v4
162172 with :
163173 path : /tmp/pip-cache
164- key : nox-${{ matrix.nox-session }}-${{ matrix.arch }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('**/ pyproject.toml') }}
174+ key : nox-${{ matrix.nox-session }}-${{ matrix.arch }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
165175
166176 # This ensures that the docker container has access to the pip cache.
167177 # Changing the user in the docker-run step causes it to fail due to
@@ -202,15 +212,22 @@ jobs:
202212 # The job name should match the name of the `nox-cross-arch` job.
203213 name : Cross-arch tests with nox
204214 needs : ["nox-cross-arch"]
215+ # We skip this job only if nox-cross-arch was also skipped
216+ if : always() && needs.nox-cross-arch.result != 'skipped'
205217 runs-on : ubuntu-20.04
218+ env :
219+ DEPS_RESULT : ${{ needs.nox-cross-arch.result }}
206220 steps :
207- - name : Return true
208- run : " true "
221+ - name : Check matrix job result
222+ run : test "$DEPS_RESULT" = "success "
209223
210224 build :
211225 name : Build distribution packages
212226 runs-on : ubuntu-20.04
213227 steps :
228+ - name : Setup Git
229+ uses :
frequenz-floss/[email protected] 230+
214231 - name : Fetch sources
215232 uses : actions/checkout@v4
216233 with :
@@ -245,15 +262,24 @@ jobs:
245262 steps :
246263 - name : Fetch sources
247264 uses : actions/checkout@v4
265+
248266 - name : Download package
249267 uses : actions/download-artifact@v4
250268 with :
251269 name : dist-packages
252270 path : dist
271+
272+ - name : Make Git credentials available to docker
273+ run : |
274+ touch ~/.git-credentials # Ensure the file exists
275+ cp ~/.git-credentials git-credentials || true
276+
253277 - name : Set up QEMU
254278 uses : docker/setup-qemu-action@v3
279+
255280 - name : Set up docker-buildx
256281 uses : docker/setup-buildx-action@v3
282+
257283 - name : Test Installation
258284 uses : docker/build-push-action@v6
259285 with :
@@ -431,6 +457,12 @@ jobs:
431457 # https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/
432458 id-token : write
433459 steps :
460+ - name : Setup Git
461+ uses :
frequenz-floss/[email protected] 462+
463+ - name : Fetch sources
464+ uses : actions/checkout@v4
465+
434466 - name : Download distribution files
435467 uses : actions/download-artifact@v4
436468 with :
0 commit comments