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:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
|
||||||
- name: Run go test
|
- name: Run go test with race detector
|
||||||
run: go test ./...
|
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||||
|
|
||||||
|
- name: Print coverage summary
|
||||||
|
if: always()
|
||||||
|
run: go tool cover -func=coverage.txt | tail -1
|
||||||
|
|
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -36,3 +36,7 @@ coverage.html
|
||||||
ralph/
|
ralph/
|
||||||
.ralph/
|
.ralph/
|
||||||
tasks/
|
tasks/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.vscode/
|
||||||
|
.cursor/
|
||||||
Loading…
Add table
Reference in a new issue