File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,14 +26,6 @@ inputs:
2626 description : Fail if line coverage is below this percent (0 disables the gate)
2727 required : false
2828 default : " 0"
29- post-pr-comment :
30- description : Post or update a sticky coverage summary on the pull request
31- required : false
32- default : " true"
33- github-token :
34- description : Token for posting PR comments
35- required : false
36- default : ${{ github.token }}
3729
3830runs :
3931 using : composite
6456 GCOV_EXECUTABLE="${{ inputs.gcov-executable }}" \
6557 FAIL_UNDER_LINE="${{ inputs.fail-under-line }}" \
6658 "${{ github.action_path }}/run_gcovr.sh"
67-
68- - name : Post coverage PR comment
69- if : inputs.post-pr-comment == 'true'
70- shell : bash
71- env :
72- GH_TOKEN : ${{ inputs.github-token }}
73- PR_NUMBER : ${{ github.event.pull_request.number }}
74- OUTPUT_DIR : ${{ github.workspace }}/${{ inputs.output-directory }}
75- GITHUB_REPOSITORY : ${{ github.repository }}
76- GITHUB_RUN_ID : ${{ github.run_id }}
77- run : |
78- chmod +x "${{ github.action_path }}/post_pr_comment.sh"
79- "${{ github.action_path }}/post_pr_comment.sh"
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -30,30 +30,3 @@ if [[ -n "${FAIL_UNDER_LINE:-}" && "${FAIL_UNDER_LINE}" != "0" ]]; then
3030fi
3131
3232gcovr " ${gcovr_args[@]} "
33-
34- if [[ -n " ${GITHUB_STEP_SUMMARY:- } " && -f " ${OUTPUT_DIR} /summary.json" ]]; then
35- {
36- echo " ## Code coverage"
37- echo " "
38- echo " | Metric | Covered | Total | Percent |"
39- echo " | --- | ---: | ---: | ---: |"
40- jq -r '
41- def metric($name):
42- if has($name) then
43- .[$name]
44- else
45- {
46- covered: .[$name + "_covered"],
47- num: .[$name + "_total"],
48- percent: .[$name + "_percent"]
49- }
50- end;
51- metric("line") as $l
52- | metric("branch") as $b
53- | metric("function") as $f
54- | "| Line | \($l.covered) | \($l.num) | \($l.percent // 0)% |",
55- "| Branch | \($b.covered) | \($b.num) | \($b.percent // 0)% |",
56- "| Function | \($f.covered) | \($f.num) | \($f.percent // 0)% |"
57- ' " ${OUTPUT_DIR} /summary.json"
58- } >> " ${GITHUB_STEP_SUMMARY} "
59- fi
Original file line number Diff line number Diff line change 1919 permissions :
2020 contents : read
2121 id-token : write
22- pull-requests : write
2322 services :
2423 ydb :
2524 image : ydbplatform/local-ydb:24.4
7069 build-directory : build
7170 source-root : ${{ github.workspace }}
7271 gcov-executable : gcov-13
73- post-pr-comment : ${{ github.event_name == 'pull_request' }}
7472
7573 - name : Upload coverage to Codecov
7674 uses : codecov/codecov-action@v5
You can’t perform that action at this time.
0 commit comments