chore(ci): add race detector and coverage reporting to PR workflow
Enable -race flag and coverage profiling in CI test step. Add coverage summary output. Update .gitignore for IDE dirs.
This commit is contained in:
parent
1cff7d4e37
commit
4d4e6b57b2
2 changed files with 10 additions and 3 deletions
7
.github/workflows/pr.yml
vendored
7
.github/workflows/pr.yml
vendored
|
|
@ -47,6 +47,9 @@ jobs:
|
|||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Run go test
|
||||
run: go test ./...
|
||||
- name: Run go test with race detector
|
||||
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
||||
- name: Print coverage summary
|
||||
if: always()
|
||||
run: go tool cover -func=coverage.txt | tail -1
|
||||
|
|
|
|||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -35,4 +35,8 @@ coverage.html
|
|||
# Ralph workspace
|
||||
ralph/
|
||||
.ralph/
|
||||
tasks/
|
||||
tasks/
|
||||
|
||||
# IDE
|
||||
.vscode/
|
||||
.cursor/
|
||||
Loading…
Add table
Reference in a new issue