|
6 | 6 | # - code changes run check-ci, the Rust and Python tests, and the replay of the recorded cases, |
7 | 7 | # which reuses main's judgements for every case whose conversion and recording are unchanged; |
8 | 8 | # - a change under a full-replay path replays every case. |
9 | | -# The nightly run on main replays every case, refreshes the replay cache pull requests reuse, |
10 | | -# converts DuckShop within its time budget and fuzzes. Release Please dispatches a full run on |
| 9 | +# The nightly run on main replays every case, checks every family's syntax obligations, refreshes |
| 10 | +# the replay cache pull requests reuse, converts DuckShop within its time budget and fuzzes; when |
| 11 | +# it fails it opens an issue labelled nightly-ci-failure, or comments on the one already open. Release Please dispatches a full run on |
11 | 12 | # each release pull request's branch, so every release replays every case first. |
12 | 13 | # A merge queue group runs the same checks as a pull request, scoped against the group's base. |
13 | 14 | on: |
|
79 | 80 | UV_NO_SYNC: "1" |
80 | 81 | # The evidence pin check and the result baselines compare with the pull request's base. |
81 | 82 | EVIDENCE_BASE: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || 'origin/main' }} |
| 83 | + # Pull requests and queue groups check the families their change touches; other runs, which |
| 84 | + # have no base to compare with, check every family's syntax obligations. |
| 85 | + SYNTAX_OBLIGATIONS_SINCE: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || '' }} |
82 | 86 | REPLAY: ${{ needs.changes.outputs.replay }} |
83 | 87 | # The Python tests and the replay take the module and binary from check-merge's gate build. |
84 | 88 | PYTHON_MODULE_BUILD: gate-build |
@@ -243,3 +247,27 @@ jobs: |
243 | 247 | name: fuzz-artifacts |
244 | 248 | path: fuzz/artifacts |
245 | 249 | if-no-files-found: ignore |
| 250 | + |
| 251 | + nightly-report: |
| 252 | + name: Report a failed nightly run |
| 253 | + if: failure() && github.event_name == 'schedule' |
| 254 | + needs: [changes, site, checks, verify, duckshop, fuzz] |
| 255 | + runs-on: ubuntu-24.04 |
| 256 | + permissions: |
| 257 | + issues: write |
| 258 | + steps: |
| 259 | + - name: Open an issue, or comment on the one already open |
| 260 | + env: |
| 261 | + GH_TOKEN: ${{ github.token }} |
| 262 | + GH_REPO: ${{ github.repository }} |
| 263 | + LABEL: nightly-ci-failure |
| 264 | + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
| 265 | + run: | |
| 266 | + body="The nightly CI run on ${GITHUB_SHA} failed: ${RUN_URL}" |
| 267 | + open=$(gh issue list --label "${LABEL}" --state open --json number --jq '.[0].number // empty') |
| 268 | + if [[ -n "${open}" ]]; then |
| 269 | + gh issue comment "${open}" --body "${body}" |
| 270 | + else |
| 271 | + gh label create "${LABEL}" --color B60205 --description "The nightly CI run failed" --force |
| 272 | + gh issue create --title "Nightly CI failed" --label "${LABEL}" --body "${body}" |
| 273 | + fi |
0 commit comments