Enchantrix/.github/workflows/go.yml
google-labs-jules[bot] b17d32999c fix: Correctly scope fuzz test in CI workflow
This commit fixes the fuzz test in the GitHub Actions workflow by correctly scoping it to the `pkg/trix` package. The `go test -fuzz` command can only be run on a single package at a time.

This also corrects the `-run` flag to ensure the fuzz test is executed correctly.
2025-11-04 01:28:24 +00:00

44 lines
914 B
YAML

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.work'
- name: Setup Task
uses: arduino/setup-task@v1
- name: Build
run: go build -v ./...
- name: Vet
run: go vet ./...
- name: Test (race + coverage)
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Fuzz (10s)
run: go test -run=Fuzz -fuzz=Fuzz -fuzztime=10s ./pkg/trix
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.out