Skip to content

Commit 171e33b

Browse files
authoredMar 14, 2025
fix: CI for PRs (#12)
* fix: artifact is uploaded with sha so it is unique * feat: added lint actions
1 parent 047ab76 commit 171e33b

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed
 

‎.github/workflows/lint.yaml

+9-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ jobs:
1818
- name: Checkout
1919
uses: actions/checkout@v4
2020

21-
- uses: reviewdog/action-setup@v1
21+
- name: Go Lint
22+
uses: reviewdog/action-golangci-lint@v2
2223
with:
23-
reviewdog_version: latest
24+
cache: true
25+
26+
- name: misspell
27+
uses: reviewdog/action-misspell@v1
28+
with:
29+
github_token: ${{ secrets.github_token }}
30+
locale: "US"

‎.github/workflows/test.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ jobs:
3434
go mod download
3535
go test -v ./... -coverpkg=./... -short -coverprofile=unit_coverage.out
3636
37+
- name: Archive code coverage results
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: code-coverage-${{github.sha}}
41+
path: unit_coverage.out
42+
3743
code_coverage:
3844
name: "Code coverage report"
3945
if: github.event_name == 'pull_request' # Do not run when workflow is triggered by push to main branch
@@ -46,5 +52,5 @@ jobs:
4652
steps:
4753
- uses: fgrosse/go-coverage-report@v1.1.1
4854
with:
49-
coverage-artifact-name: "code-coverage" # can be omitted if you used this default value
55+
coverage-artifact-name: code-coverage-${{github.sha}} # can be omitted if you used this default value
5056
coverage-file-name: unit_coverage.out

0 commit comments

Comments
 (0)