name: CI on: push: branches: [main] paths: - '**.go' - 'go.mod' - 'go.sum' - '.golangci.yml' - '.github/workflows/**' pull_request: paths: - '**.go' - 'go.mod' - 'go.sum' - '.golangci.yml' - '.github/workflows/**' permissions: contents: read jobs: ci: uses: bnema/gh-actions/.github/workflows/go-ci.yml@main with: go-version: stable test-flags: '-race -v ./...' quality: needs: ci runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: actions/setup-go@v7 with: go-version: stable - name: Check production import direction shell: bash run: | if go list -f '{{join .Imports "\n"}}' . | grep -q '/ansi'; then echo 'the VT root must not import the ANSI package' exit 1 fi if ! go list -f '{{join .Imports "\n"}}' ./ansi | grep -q '/core'; then echo 'the ANSI package must consume the core model' exit 1 fi - name: VT fuzz smoke run: go test . -run '^$' -fuzz FuzzVTInputDoesNotPanic -fuzztime=10s - name: ANSI fuzz smoke run: go test . -run '^$' -fuzz FuzzANSIRenderingDoesNotPanic -fuzztime=10s - name: VTH3 fuzz smoke run: go test . -run '^$' -fuzz FuzzHistoryPreflightMatchesUnmarshal -fuzztime=10s - name: Benchmark smoke run: go test ./... -run '^$' -bench='(VT|History|Snapshot|ANSI)' -benchmem -benchtime=1x - name: External consumer smoke run: scripts/consumer-smoke.sh