Skip to content

Commit 452c465

Browse files
committed
test coverage
1 parent 0425d76 commit 452c465

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/backend.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ jobs:
2828
working-directory: MyMusicBoxApi
2929
run: go mod tidy
3030

31-
- name: Test
31+
- name: Run tests with coverage
3232
working-directory: MyMusicBoxApi
33-
run: go test -v ./...
33+
run: go test -v -coverprofile=coverage.out ./...
34+
35+
- name: Show coverage summary
36+
working-directory: MyMusicBoxApi
37+
run: go tool cover -func=coverage.out
38+
39+
- name: Upload coverage artifact
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: coverage-report
43+
path: MyMusicBoxApi/coverage.out

0 commit comments

Comments
 (0)