Skip to content

Commit

Permalink
feat(ci): add code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Nov 17, 2022
1 parent b41e50d commit d3d2d63
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,21 @@ jobs:
snapshot:
uses: charmbracelet/meta/.github/workflows/snapshot.yml@main
secrets:
goreleaser_key: ${{ secrets.GORELEASER_KEY }}
goreleaser_key: ${{ secrets.GORELEASER_KEY }}

coverage:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1

- name: Test
run: go test -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./... -timeout 5m
- uses: codecov/codecov-action@v3
with:
file: ./coverage.txt

0 comments on commit d3d2d63

Please sign in to comment.