Skip to content

Run CI nightly at 05:03 UTC and on demand - #149

Merged
NSchatz merged 1 commit into
mainfrom
harness/28-nightly-run-of-ci
Oct 19, 2026
Merged

NSchatz merged 1 commit into
mainfrom
harness/28-nightly-run-of-ci

Conversation

@NSchatz

@NSchatz NSchatz commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

CI on main now also runs every night, and can be started by hand.

What changes

.github/workflows/ci.yml gets two more triggers. push and pull_request stay as they are:

  schedule:
    # The nightly run on main, 05:03 UTC. An odd minute: GitHub delays scheduled runs at the start of every hour.
    - cron: "3 5 * * *"
  workflow_dispatch:

A scheduled run tests the latest commit on the default branch. So if main goes red with no push behind it (a dependency, a runner image, an expired date, the shared workflow), we find out the next morning.

Why no job needed a guard

We read every job and step in this workflow and in the reusable cosyte/.github/.github/workflows/ci.yml@main it calls. None of them reads github.event.pull_request.*, github.head_ref, github.base_ref, github.event.before or github.event_name, and none diffs against a PR base. So a scheduled or dispatched run checks main the same way a push to main does today. No job was renamed or dropped, so the required checks (ci / actionlint, ci / verify (22, ubuntu-latest), ci / verify (24, ubuntu-latest)) are unchanged. A pull-request run checks exactly what it did before.

Proof of the non-PR path

gh workflow run ci.yml -R cosyte/ccda --ref harness/28-nightly-run-of-ci was accepted. That dispatch run passed on the head commit 1ceaac4, all six jobs green: https://github.com/cosyte/ccda/actions/runs/39343763213.

Gate run locally

All passed: typecheck, lint, format:check, phi-scan, check:no-emdash, check:no-internal-refs, check:agent-notes, test:coverage, build, attw, and actionlint 1.7.7 over .github/workflows/*.yml.

Notes

  • The workflow's concurrency group is ${{ github.workflow }}-${{ github.ref }} with cancel-in-progress: true. A scheduled run and a push run on main therefore share one group, and whichever starts second cancels the other. Both test the same main, and a cancelled run reports no result in either direction. We left it alone because changing it is outside this change's scope.
  • No changeset: nothing under src/ or in the published package moves.

Harness-Task: 28

🤖 Generated with Claude Code

Add a schedule trigger (cron "3 5 * * *") and workflow_dispatch to
ci.yml, keeping push and pull_request as they are. A main that goes red
without a push (a dependency, a runner image, an expired date, the
shared workflow) is then found the next morning.

No job needs a guard: no job or step here, and nothing in the shared
reusable workflow it calls, reads pull-request context or the event
name, so a scheduled or dispatched run checks main exactly as a push
to main does. Job names are unchanged, so the required checks are too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NSchatz
NSchatz merged commit 18a1403 into main Oct 19, 2026
19 checks passed
@NSchatz
NSchatz deleted the harness/28-nightly-run-of-ci branch October 19, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant