-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[no-relnote] Add test coverage report
Signed-off-by: Evan Lezar <[email protected]>
- Loading branch information
Showing
1 changed file
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ jobs: | |
args: -v --timeout 5m | ||
skip-cache: true | ||
- name: Check golang modules | ||
run: | | ||
run: | | ||
make check-vendor | ||
make -C deployments/devel check-modules | ||
test: | ||
|
@@ -67,7 +67,29 @@ jobs: | |
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GOLANG_VERSION }} | ||
- run: make test | ||
- run: make coverage | ||
|
||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: code-coverage | ||
path: coverage.out.no-mocks | ||
|
||
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: tests # 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: "coverage.out.no-mocks" # can be omitted if you used this default value | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|