Skip to content

Commit ee3db4d

Browse files
committed
WIP
1 parent f7f6fbf commit ee3db4d

File tree

2 files changed

+20
-23
lines changed

2 files changed

+20
-23
lines changed

.github/workflows/go-pr.yaml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,12 @@ jobs:
2121

2222
- name: Test
2323
run: make test-with-coverage
24-
25-
- name: Coverage
26-
id: coverage
27-
uses: vladopajic/go-test-coverage@v2
28-
with:
29-
config: ./.testcoverage.yml
3024

31-
- name: Post coverage report
32-
uses: peter-evans/create-or-update-comment@v4
25+
- name: Archive code coverage results
26+
uses: actions/upload-artifact@v4
3327
with:
34-
token: ${{ secrets.GITHUB_TOKEN }}
35-
issue-number: ${{ github.event.pull_request.number }}
36-
comment-id: ${{ steps.fc.outputs.comment-id }}
37-
body: |
38-
go-test-coverage report:
39-
```
40-
${{ fromJSON(steps.coverage.outputs.report) }}
41-
```
42-
edit-mode: replace
43-
44-
- name: Check coverage
45-
if: steps.coverage.outcome == 'failure'
46-
shell: bash
47-
run: echo "coverage check failed" && exit 1
28+
name: code-coverage
29+
path: coverage.out
4830

4931
Lint:
5032
name: lint
@@ -59,3 +41,18 @@ jobs:
5941
uses: golangci/golangci-lint-action@v6
6042
with:
6143
version: v1.62
44+
45+
PostCoverageReport:
46+
name: "Code coverage report"
47+
if: github.event_name == 'pull_request'
48+
runs-on: ubuntu-latest
49+
needs: Build
50+
permissions:
51+
contents: read
52+
actions: read
53+
pull-requests: write
54+
steps:
55+
- uses: fgrosse/go-coverage-report@v1.1.1
56+
with:
57+
coverage-artifact-name: "code-coverage"
58+
coverage-file-name: "coverage.out"

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
version: "~> v2"
2828
args: release --clean
2929
env:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)