name: go on: workflow_dispatch: push: branches: [main] paths: ["**.go", "go.mod", "go.sum"] pull_request: paths: ["**.go", "go.mod", "go.sum"] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: setup go uses: actions/setup-go@v5 with: go-version-file: go.mod cache-dependency-path: go.mod - name: build run: go build ./cmd/json2go - name: test run: go test -v ./... fuzz: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: setup go uses: actions/setup-go@v5 with: go-version-file: go.mod cache-dependency-path: go.mod - name: fuzz parser run: go test -fuzz=FuzzParser -fuzztime=60s ./ bench: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: setup go uses: actions/setup-go@v5 with: go-version-file: go.mod cache-dependency-path: go.mod - name: run benchmarks run: go test -bench=. -benchmem -v ./