Skip to content

Commit bf3c0f8

Browse files
committed
ci: add compat-test + fuzz targets and wire fuzz smoke into CI
The CI workflow already invoked make compat-test, which did not exist in the Makefile. Add the missing target along with a fuzz target so the existing fuzz harnesses run for a short pass on every push and pull request. Local runs can override FUZZTIME for deeper sessions.
1 parent bdddde5 commit bf3c0f8

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,22 @@ jobs:
3232

3333
- name: Run compatibility fixtures
3434
run: make compat-test
35+
36+
fuzz:
37+
name: Fuzz smoke
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- name: Check out repository
42+
uses: actions/checkout@v5
43+
44+
- name: Set up Go
45+
uses: actions/setup-go@v6
46+
with:
47+
go-version-file: go.mod
48+
cache-dependency-path: go.sum
49+
50+
# Short fuzz pass to catch regressions on the parser pipeline and
51+
# readerability pre-check. Local runs can use a longer FUZZTIME.
52+
- name: Run fuzz smoke
53+
run: make fuzz FUZZTIME=20s

‎Makefile‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
.PHONY: all test vet
1+
.PHONY: all test vet compat-test fuzz
22

33
all: vet test
44

55
test:
66
go test -race -cover -count=1 ./...
77
READABILITY_FULL_COMPAT=1 go test -cover -count=1 -run 'TestParseAllMozilla(Metadata|Content)Fixtures|TestMozilla' ./...
88

9+
# compat-test runs only the Mozilla compatibility fixtures; useful when the
10+
# default unit tests have already passed and you only want the drift report.
11+
compat-test:
12+
READABILITY_FULL_COMPAT=1 go test -cover -count=1 -run 'TestParseAllMozilla(Metadata|Content)Fixtures|TestMozilla' ./...
13+
914
vet:
1015
go vet ./...
16+
17+
# Short-duration fuzz pass for CI; bump FUZZTIME locally for deeper runs.
18+
FUZZTIME ?= 30s
19+
20+
fuzz:
21+
go test -run=^$$ -fuzz=FuzzFromReader -fuzztime=$(FUZZTIME) .
22+
go test -run=^$$ -fuzz=FuzzIsProbablyReaderable -fuzztime=$(FUZZTIME) .

0 commit comments

Comments
 (0)