-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 962 Bytes
/
backend.yml
File metadata and controls
43 lines (35 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Api Tests
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
permissions:
contents: write
pull-requests: write
jobs:
api_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24.3'
cache-dependency-path: MyMusicBoxApi/go.sum
- name: Tidy modules (sync go.mod & go.sum)
working-directory: MyMusicBoxApi
run: go mod tidy
- name: Run tests with coverage
working-directory: MyMusicBoxApi
run: go test -v -coverprofile=coverage.out ./...
- name: Show coverage summary
working-directory: MyMusicBoxApi
run: go tool cover -func=coverage.out
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: MyMusicBoxApi/coverage.out