enable code coverage (#30)

This commit is contained in:
Tiger Wang
2023-01-17 12:38:22 -05:00
committed by GitHub
parent 13b6091c79
commit 4fc80b5a1e
4 changed files with 27 additions and 3 deletions
+24
View File
@@ -0,0 +1,24 @@
name: Collect Code Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Go Generate
run: go generate
- name: Run coverage
run: go test -race -failfast -coverprofile=coverage.txt -covermode=atomic -v ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3