Skip to content

Commit fef0656

Browse files
committed
defined path and artifact-name via env
1 parent 6ce0ace commit fef0656

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
branches:
88
- main
99

10+
env:
11+
CODE_COVERAGE_FILE_NAME: "coverage.out" # must be the same as in Makefile
12+
CODE_COVERAGE_ARTIFACT_NAME: "code-coverage"
13+
1014
jobs:
1115
main:
1216
name: CI
@@ -34,8 +38,8 @@ jobs:
3438
- name: Archive code coverage results
3539
uses: actions/upload-artifact@v4
3640
with:
37-
name: code-coverage
38-
path: coverage.out
41+
name: ${{ env.CODE_COVERAGE_ARTIFACT_NAME }}
42+
path: ${{ env.CODE_COVERAGE_FILE_NAME }}
3943

4044
config:
4145
name: Check GoReleaser config
@@ -62,4 +66,5 @@ jobs:
6266
steps:
6367
- uses: fgrosse/go-coverage-report@v1.1.1
6468
with:
65-
coverage-file-name: "coverage.out"
69+
coverage-artifact-name: ${{ env.CODE_COVERAGE_ARTIFACT_NAME }}
70+
coverage-file-name: ${{ env.CODE_COVERAGE_FILE_NAME }}

0 commit comments

Comments
 (0)