Skip to content

Commit

Permalink
chore: upload coverage reports to codacy (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Jan 10, 2023
1 parent b1b3685 commit 963c736
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,23 @@ jobs:
- name: Run Test
run: |
go test -v ./... -covermode=count -coverprofile=coverage.out
go tool cover -func=coverage.out -o=coverage.out
go tool cover -func=coverage.out -o=coverage2.out
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.out
force-coverage-parser: go
language: go

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3

- name: Go Coverage Badge # Pass the `coverage.out` output to this action
- name: Go Coverage Badge
uses: tj-actions/coverage-badge-go@v2
with:
filename: coverage.out
filename: coverage2.out

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v13
Expand Down

0 comments on commit 963c736

Please sign in to comment.