name: coverage # push is scoped to main so a push to a PR branch fires only the # pull_request run, not both. Merges to main still run via push. on: push: branches: [main] pull_request: jobs: coverage: strategy: matrix: go-version: [^1] os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} env: GO111MODULE: "on" steps: - name: Install Go uses: actions/setup-go@v7 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v7 - name: Coverage run: | go test -race -covermode=atomic -coverprofile='coverage.txt' ./... - uses: codecov/codecov-action@v7 with: file: ./coverage.txt token: ${{ secrets.CODECOV_TOKEN }}