File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run Tests
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ push :
8+ branches :
9+ - main
10+
11+ jobs :
12+ test :
13+ name : Test
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Go
21+ uses : actions/setup-go@v5
22+ with :
23+ go-version : ' 1.24.1'
24+ cache : true
25+
26+ - name : Download dependencies
27+ run : go mod download
28+
29+ - name : Verify dependencies
30+ run : go mod verify
31+
32+ - name : Run go vet
33+ run : go vet ./...
34+
35+ - name : Run tests
36+ run : go test -v -race -coverprofile=coverage.out ./...
37+
38+ - name : Check test coverage
39+ run : go tool cover -func=coverage.out
40+
41+ - name : Upload coverage to artifacts
42+ uses : actions/upload-artifact@v4
43+ with :
44+ name : coverage-report
45+ path : coverage.out
You can’t perform that action at this time.
0 commit comments