Repository navigation
64 lines (62 loc) · 2.52 KB
/
Copy pathfuzz.yml
File metadata and controls
64 lines (62 loc) · 2.52 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
60
61
62
63
64
name: fuzz
# The fixed nightly profile checks 20,000 values with seed 2; repeat it with
# `pnpm all check -- --nightly`. The shrunk
# counterexamples a failing run saves come back as a pull request into its branch, or the default branch for a tag.
# Beside it, the self-test of the tools runs without the tool runs earlier
# self-tests kept.
on:
schedule:
- cron: "17 4 * * *"
workflow_dispatch:
jobs:
vibestack-nightly-check:
name: fuzz
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_CACHE: local:rw,remote:r
TURBO_TELEMETRY_DISABLED: "1"
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup
with:
cache-verification: "false"
- run: pnpm eliza
# --nightly bypasses the inner verification cache and always exercises the real application.
- run: pnpm all check --continue -- --nightly
- if: failure()
env:
GH_TOKEN: ${{ github.token }}
BRANCH: fuzz/${{ github.run_id }}
BASE_BRANCH: ${{ github.ref_type == 'branch' && github.ref_name || github.event.repository.default_branch }}
run: |
counterexamples=':(glob)**/test/counterexamples/**'
[[ -n "$(git status --porcelain -- "$counterexamples")" ]] || exit 0
git add -- "$counterexamples"
git diff --cached --quiet && exit 0
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git switch -c "$BRANCH"
git commit -m "Counterexamples from nightly profile run $GITHUB_RUN_ID"
git push origin "$BRANCH"
gh pr create --base "$BASE_BRANCH" --head "$BRANCH" --title "Fuzz counterexamples, nightly profile" \
--body "The nightly fuzz run $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID failed and saved these shrunk traces. Each is a regression test: decide whether the application or the spec is wrong, fix that, and keep the trace."
vibestack-fixture-selftests:
name: selftest (${{ matrix.shard }})
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
shard: [a, b, c, rest]
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup
with:
job: selftest-${{ matrix.shard }}
cache-verification: "false"
- run: pnpm selftest:tools:${{ matrix.shard }}