diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml deleted file mode 100644 index e714020..0000000 --- a/.github/workflows/coverage.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Coverage - -on: - push: - workflow_call: - -jobs: - lint: - name: Coverage report - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-go@v4 - with: - go-version-file: 'go.mod' - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b8d48bf..8400dbd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,4 +15,9 @@ jobs: go-version-file: 'go.mod' - name: Run unit tests - run: go test ./... + run: go test -race -coverprofile=coverage.out -covermode=atomic ./... + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}