blob: 4ebfd28346bda3e5783998d95d6b31be46c8d8df [file]
name: Fuzz
# Nightly long run. Pull requests and pushes get a short run from the
# Build & Test workflow.
on:
schedule:
- cron: '23 3 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
fuzz:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
node-version: [22.x, 24.x, 26.x]
steps:
- name: Harden the runner
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build
run: npm run build
# Several short rounds instead of one long one: every round draws a
# fresh seed, and the harness holds on to each jsdom window until the
# process exits, so a single long round runs out of memory.
- name: Run fuzzing
env:
FUZZ_RUNS: 300
run: |
for round in 1 2 3 4 5 6 7 8; do
echo "::group::Round $round"
npm run test:fuzz
echo "::endgroup::"
done