-
Notifications
You must be signed in to change notification settings - Fork 8
40 lines (33 loc) · 1016 Bytes
/
coverage.yml
File metadata and controls
40 lines (33 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: coverage
on: [pull_request]
jobs:
coverage:
name: Publish Coverage
needs: check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download coverage artifact
uses: actions/download-artifact@v4
with:
name: coverage-stable
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Convert go coverage to cobertura format
run: |
go install github.com/boumenot/gocover-cobertura@latest
gocover-cobertura -by-files < coverage.out > coverage.xml
- name: Get PR number
uses: jwalton/gh-find-current-pr@v1
id: finder
- name: Add Coverage PR Comment
uses: 5monkeys/cobertura-action@master
with:
path: coverage.xml
skip_covered: false
minimum_coverage: 0
fail_below_threshold: true
pull_request_number: ${{ steps.finder.outputs.pr }}