go.yml (889B)
1 name: Go 2 3 on: 4 push: 5 branches: [main] 6 paths: 7 - '**.go' 8 - 'go.mod' 9 - 'go.sum' 10 - '.github/workflows/go.yml' 11 pull_request: 12 branches: [main] 13 paths: 14 - '**.go' 15 - 'go.mod' 16 - 'go.sum' 17 - '.github/workflows/go.yml' 18 19 jobs: 20 test: 21 runs-on: ubuntu-latest 22 23 steps: 24 - uses: actions/checkout@v4 25 26 - name: Set up Go 27 uses: actions/setup-go@v5 28 with: 29 go-version-file: go.mod 30 cache-dependency-path: go.sum 31 32 - name: Download dependencies 33 run: go mod download 34 35 - name: Build 36 run: go build -v ./... 37 38 - name: Test 39 run: go test -v -race -coverprofile=coverage.out ./... 40 41 - name: Upload coverage 42 uses: codecov/codecov-action@v4 43 with: 44 files: coverage.out 45 fail_ci_if_error: false 46 continue-on-error: true