|  | 
| 79 | 79 |         run: nox -R -e "$NOX_SESSION" | 
| 80 | 80 |         timeout-minutes: 10 | 
| 81 | 81 | 
 | 
|  | 82 | +  # This job runs if all the `nox` matrix jobs ran and succeeded. | 
|  | 83 | +  # It is only used to have a single job that we can require in branch | 
|  | 84 | +  # protection rules, so we don't have to update the protection rules each time | 
|  | 85 | +  # we add or remove a job from the matrix. | 
|  | 86 | +  nox-all: | 
|  | 87 | +    # The job name should match the name of the `nox` job. | 
|  | 88 | +    name: Test with nox | 
|  | 89 | +    needs: ["nox"] | 
|  | 90 | +    runs-on: ubuntu-20.04 | 
|  | 91 | +    steps: | 
|  | 92 | +      - name: Return true | 
|  | 93 | +        run: "true" | 
|  | 94 | + | 
| 82 | 95 |   nox-cross-arch: | 
| 83 | 96 |     name: Cross-arch tests with nox | 
| 84 | 97 |     if: github.event_name != 'pull_request' | 
| @@ -172,22 +185,25 @@ jobs: | 
| 172 | 185 |         if: always() | 
| 173 | 186 |         run: sudo chown -R $USER:$USER /tmp/pip-cache | 
| 174 | 187 | 
 | 
| 175 |  | -  # This job runs if `nox-cross-arch` ran and succeeded. | 
| 176 |  | -  # This is required because, when the `nox-cross-arch` job is skipped, its | 
| 177 |  | -  # inner matrix is not expanded, and branch protection rules on the | 
| 178 |  | -  # inner-matrix jobs get stuck. So instead of `nox-cross-arch`, this job can be | 
| 179 |  | -  # used in the branch protection rules. | 
| 180 |  | -  # At the time of writing this, there is an ongoing discussion about this here: | 
|  | 188 | +  # This job runs if all the `nox-cross-arch` matrix jobs ran and succeeded. | 
|  | 189 | +  # As the `nox-all` job, its main purpose is to provide a single point of | 
|  | 190 | +  # reference in branch protection rules, similar to how `nox-all` operates. | 
|  | 191 | +  # However, there's a crucial difference: the `nox-cross-arch` job is omitted | 
|  | 192 | +  # in PRs. Without the `nox-cross-arch-all` job, the inner matrix wouldn't be | 
|  | 193 | +  # expanded in such scenarios. This would lead to the CI indefinitely waiting | 
|  | 194 | +  # for these jobs to complete due to the branch protection rules, essentially | 
|  | 195 | +  # causing it to hang. This behavior is tied to a recognized GitHub matrices | 
|  | 196 | +  # issue when certain jobs are skipped. For a deeper understanding, refer to: | 
| 181 | 197 |   # https://github.com/orgs/community/discussions/9141 | 
| 182 | 198 |   nox-cross-arch-all: | 
|  | 199 | +    # The job name should match the name of the `nox-cross-arch` job. | 
| 183 | 200 |     name: Cross-arch tests with nox | 
| 184 | 201 |     needs: ["nox-cross-arch"] | 
| 185 | 202 |     runs-on: ubuntu-20.04 | 
| 186 | 203 |     steps: | 
| 187 | 204 |       - name: Return true | 
| 188 | 205 |         run: "true" | 
| 189 | 206 | 
 | 
| 190 |  | - | 
| 191 | 207 |   build: | 
| 192 | 208 |     name: Build distribution packages | 
| 193 | 209 |     runs-on: ubuntu-20.04 | 
|  | 
0 commit comments