name: Test on: pull_request: push: branches: - main jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: actions/setup-go@v7 with: go-version-file: go.mod cache: true - name: Check formatting run: | unformatted=$(gofmt -l .) if [ -n "$unformatted" ]; then echo "gofmt needed for:" echo "$unformatted" exit 1 fi - name: Vet run: go vet ./... - name: Run tests run: go test -race ./...