File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed
Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 4949 args : -v --timeout 5m
5050 skip-cache : true
5151 - name : Check golang modules
52- run : |
52+ run : |
5353 make check-vendor
5454 make -C deployments/devel check-modules
5555 test :
6767 uses : actions/setup-go@v5
6868 with :
6969 go-version : ${{ env.GOLANG_VERSION }}
70- - run : make test
70+ - run : make coverage
71+
72+ - name : Archive code coverage results
73+ uses : actions/upload-artifact@v4
74+ with :
75+ name : code-coverage
76+ path : coverage.out.no-mocks
77+
78+ code_coverage :
79+ name : " Code coverage report"
80+ if : github.event_name == 'pull_request' # Do not run when workflow is triggered by push to main branch
81+ runs-on : ubuntu-latest
82+ needs : tests # Depends on the artifact uploaded by the "unit_tests" job
83+ permissions :
84+ contents : read
85+ actions : read # to download code coverage results from "test" job
86+ pull-requests : write # write permission needed to comment on PR
87+ steps :
88+ - uses : fgrosse/go-coverage-report@v1.2.0 # Consider using a Git revision for maximum security
89+ with :
90+ coverage-artifact-name : " code-coverage" # can be omitted if you used this default value
91+ coverage-file-name : " coverage.out.no-mocks" # can be omitted if you used this default value
92+
7193 build :
7294 name : Build
7395 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments