Repository navigation
Nightly #87
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly | |
| # The gate runs Hypothesis derandomised at 300 examples, deliberately: a PR check that flakes is a check | |
| # people learn to ignore. The cost is that every run sees the same inputs, so a rare violation can sit | |
| # there forever. This explores 10,000 randomised examples per property, off the critical path, where a | |
| # failure is a finding rather than a blocked merge. | |
| on: | |
| schedule: | |
| - cron: "23 3 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| explore: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 | |
| with: | |
| enable-cache: false | |
| - name: Property tests, wide and randomised | |
| run: uv run --locked pytest --hypothesis-profile=explore -q --no-cov | |
| # A red nightly is a real property violation, not noise (unlike the Mutation survivors), yet it is off | |
| # the merge path, so nothing surfaces it - a failure sat unseen for days. On failure open, or bump, a | |
| # single tracking issue so it is visible without anyone watching the schedule. | |
| notify: | |
| needs: explore | |
| if: failure() | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Open or bump the tracking issue | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| REPO: ${{ github.repository }} | |
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| run: | | |
| title="Nightly wide-hypothesis run is failing" | |
| number=$(gh issue list --repo "$REPO" --state open --search "$title in:title" --json number --jq '.[0].number // empty') | |
| if [ -n "$number" ]; then | |
| gh issue comment "$number" --repo "$REPO" --body "Still failing: $RUN_URL" | |
| else | |
| gh issue create --repo "$REPO" --title "$title" \ | |
| --body "The scheduled wide Hypothesis run (10k examples) failed - it catches divergences the 300-example gate misses. Run: $RUN_URL" | |
| fi |