Skip to content

Commit

Permalink
add code coverage (#26)
Browse files Browse the repository at this point in the history
* add code coverage

* update coverage

* update token
  • Loading branch information
knbr13 authored Feb 20, 2024
1 parent 23a2be3 commit aa1a5e9
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
test:
Expand All @@ -25,5 +26,19 @@ jobs:
- name: setup tests
run: ./setup-test.sh

- name: Run tests
run: go test ./...
- name: Run tests and generate coverage report
run: |
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out -o coverage.txt
go tool cover -html=coverage.out -o coverage.html
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
verbose: true
name: codecov-umbrella
file: coverage.txt
fail_ci_if_error: true
slug: knbr13/gitcs
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit aa1a5e9

Please sign in to comment.