Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
varungup90 committed Feb 4, 2025
1 parent ce90655 commit e304705
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/lint-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,23 @@ jobs:
${{ runner.os }}-go-
- name: Run Unit Tests
run: make test
- name: Publish Unit Test Coverage
uses: codecov/codecov-action@v1
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
flags: unittests
file: cover.out
token: ${{ secrets.CODECOV_TOKEN }}
name: code-coverage
path: cover.out # Make sure to use the same file name you chose for the "-coverprofile" in the "Test" step

code_coverage:
name: "Code coverage report"
if: github.event_name == 'pull_request' # Do not run when workflow is triggered by push to main branch
runs-on: ubuntu-latest
needs: test # Depends on the artifact uploaded by the "unit_tests" job
permissions:
contents: read
actions: read # to download code coverage results from "test" job
pull-requests: write # write permission needed to comment on PR
steps:
- uses: fgrosse/[email protected] # Consider using a Git revision for maximum security
with:
coverage-artifact-name: "code-coverage" # can be omitted if you used this default value
coverage-file-name: "cover.out" # can be omitted if you used this default value

0 comments on commit e304705

Please sign in to comment.