diff --git a/.github/workflow/codecov.yml b/.github/workflow/codecov.yml new file mode 100644 index 0000000..56221f8 --- /dev/null +++ b/.github/workflow/codecov.yml @@ -0,0 +1,21 @@ +name: Test and coverage + +on: + pull_request: + branches: ['v3'] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run coverage + run: go test ./... -race -coverprofile=coverage.out -covermode=atomic + - name: Upload coverage to Codecov + if: success() || failure() + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false + files: ./coverage.out + move_coverage_to_trash: true