diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index dfc2587..65a977b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -46,7 +46,11 @@ jobs: with: fetch-depth: 1 - uses: actions/setup-go@v4 - - run: go test + - run: go test -race -coverprofile=coverage.txt -covermode=atomic + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} build: name: "Build Code" runs-on: ubuntu-latest diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..55e5016 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,6 @@ +comment: # this is a top-level key + layout: " diff, flags, files" + behavior: default + require_changes: false # if true: only post the comment if coverage changes + require_base: false # [true :: must have a base report to post] + require_head: true # [true :: must have a head report to post]