okami.mom/ultraviolet
git clone https://git.nkp.pet/okami.mom/ultraviolet
3d151a2
main
1name : conformance 2 3# Fuzz tests that drive the renderer against real terminal emulators. 4# 5# They live in their own module (internal/conformance) because the reference 6# emulator is a cgo package with a newer Go requirement, and neither cost 7# belongs in the library that ships to users. That also means the root module's 8# CI never runs them, so they get their own workflow here. 9 10# push is scoped to main so a push to a PR branch fires only the 11# pull_request run, not both. Merges to main still run via push. 12on : 13push : 14branches : [ main ] 15pull_request : 16schedule : 17# A nightly coverage-guided run, so new bugs are found without waiting for 18# someone to run -fuzz by hand. 19- cron : "0 6 * * *" 20workflow_dispatch : {} 21 22jobs : 23test : 24runs-on : ubuntu-latest 25steps : 26- uses : actions/checkout@v7 27 28- uses : actions/setup-go@v7 29with : 30go-version-file : ./internal/conformance/go.mod 31cache : true 32 33# Builds or restores libghostty-vt and puts it on PKG_CONFIG_PATH. 34- uses : ./.github/actions/libghostty-vt 35 36- name : Test 37working-directory : ./internal/conformance 38run : go test -count=1 -timeout 10m ./... 39 40 41# Coverage-guided fuzzing. This is deliberately not run on every push; it is 42# slow and its job is to find new bugs, not to gate commits. The test job 43# above already replays every known failing input on each push. 44fuzz : 45if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' 46runs-on : ubuntu-latest 47strategy : 48fail-fast : false 49matrix : 50target : 51- FuzzRenderer 52- FuzzRendererIdempotent 53- FuzzRedrawResyncs 54- FuzzScreenShowsContent 55steps : 56- uses : actions/checkout@v7 57 58- uses : actions/setup-go@v7 59with : 60go-version-file : ./internal/conformance/go.mod 61cache : true 62 63- uses : ./.github/actions/libghostty-vt 64 65- name : Fuzz ${{ matrix.target }} 66working-directory : ./internal/conformance 67run : go test -run='XXX' -fuzz='${{ matrix.target }}$' -fuzztime=15m 68 69# A new crasher is written under testdata/ on failure. Upload it so it can 70# be committed as a regression test rather than lost with the runner. 71- name : Upload new crashers 72if : failure() 73uses : actions/upload-artifact@v7 74with : 75name : crashers-${{ matrix.target }} 76path : internal/conformance/testdata/fuzz/ 77if-no-files-found : ignore