Repository navigation
59 lines (51 loc) · 2.18 KB
/
Copy pathnightly.yml
File metadata and controls
59 lines (51 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.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