# This workflow will build a golang project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go name: Go on: push: branches: [ "main" ] pull_request: branches: [ "main" ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: Set up Go uses: actions/setup-go@v6 with: go-version: '1.26.2' - name: Go Format run: | gofmt -s -l . if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi - name: GolangCI-Lint uses: golangci/golangci-lint-action@v8 with: version: v2.12.2 - name: Go Vet run: go vet ./... - name: Build run: go build -v ./... - name: Test run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./... - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }}