github.com/phsym/zeroslog@v0.1.1-0.20240224183259-0b7a5ea94339/.github/workflows/go.yml (about) 1 # This workflow will build a golang project 2 # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go 3 4 name: Build 5 6 on: 7 push: 8 branches: ["main"] 9 pull_request: 10 branches: ["main"] 11 12 jobs: 13 build: 14 runs-on: ubuntu-latest 15 steps: 16 - uses: actions/checkout@v3 17 18 - name: Set up Go 19 uses: actions/setup-go@v4 20 with: 21 go-version: "1.21" 22 23 - name: Build 24 run: go build -v ./... 25 26 - name: Test 27 run: go test -race -coverprofile=coverage.txt -covermode=atomic -v ./... 28 29 - name: Upload coverage to Codecov 30 uses: codecov/codecov-action@v3