File tree Expand file tree Collapse file tree 2 files changed +40
-36
lines changed Expand file tree Collapse file tree 2 files changed +40
-36
lines changed Original file line number Diff line number Diff line change
1
+ name : coverage
2
+
3
+ on : [pull_request]
4
+
5
+ jobs :
6
+ coverage :
7
+ name : Publish Coverage
8
+ needs : check
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Download coverage artifact
15
+ uses : actions/download-artifact@v4
16
+ with :
17
+ name : coverage-stable
18
+
19
+ - name : Setup go
20
+ uses : actions/setup-go@v5
21
+ with :
22
+ go-version : ' stable'
23
+
24
+ - name : Convert go coverage to cobertura format
25
+ run : |
26
+ go install github.com/boumenot/gocover-cobertura@latest
27
+ gocover-cobertura -by-files < coverage.out > coverage.xml
28
+
29
+ - name : Get PR number
30
+ uses : jwalton/gh-find-current-pr@v1
31
+ id : finder
32
+
33
+ - name : Add Coverage PR Comment
34
+ uses : 5monkeys/cobertura-action@master
35
+ with :
36
+ path : coverage.xml
37
+ skip_covered : false
38
+ minimum_coverage : 0
39
+ fail_below_threshold : true
40
+ pull_request_number : ${{ steps.finder.outputs.pr }}
Original file line number Diff line number Diff line change 37
37
name : coverage-${{ matrix.go }}
38
38
path : test/coverage.out
39
39
40
- coverage :
41
- name : Publish Coverage
42
- needs : check
43
- runs-on : ubuntu-latest
44
- steps :
45
- - name : Checkout code
46
- uses : actions/checkout@v4
47
-
48
- - name : Download coverage artifact
49
- uses : actions/download-artifact@v4
50
- with :
51
- name : coverage-stable
52
-
53
- - name : Setup go
54
- uses : actions/setup-go@v5
55
- with :
56
- go-version : ' stable'
57
-
58
- - name : Convert go coverage to corbetura format
59
- run : |
60
- go install github.com/boumenot/gocover-cobertura@latest
61
- gocover-cobertura -by-files < coverage.out > coverage.xml
62
-
63
- - name : Get PR number
64
- uses : jwalton/gh-find-current-pr@v1
65
- id : finder
66
-
67
- - name : Add Coverage PR Comment
68
- uses : 5monkeys/cobertura-action@master
69
- with :
70
- path : coverage.xml
71
- skip_covered : false
72
- minimum_coverage : 0
73
- fail_below_threshold : true
74
- pull_request_number : ${{ steps.finder.outputs.pr }}
75
-
76
40
test :
77
41
name : Docker tests
78
42
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments