Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 }}
36 changes: 0 additions & 36 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,6 @@ jobs:
name: coverage-${{ matrix.go }}
path: test/coverage.out

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 corbetura 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 }}

test:
name: Docker tests
runs-on: ubuntu-latest
Expand Down
Loading