Skip to content

Commit

Permalink
add test coverage to the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
aellwein committed Apr 15, 2022
1 parent 9856153 commit 3af8347
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ jobs:
matrix:
go: ["1.16", "1.17", "1.18"]
steps:
- uses: actions/checkout@v3
- name: Set up Go
- name: Checkout
uses: actions/checkout@v3

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
Expand All @@ -24,3 +26,25 @@ jobs:

- name: Test
run: go test ./...
codecov:
name: codecov
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: "1.17"

- name: Checkout
uses: actions/checkout@v3

- name: Generate coverage report
run: |
go test ./... -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
files: ./coverage.txt
flags: unittests
name: codecov
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage.txt

0 comments on commit 3af8347

Please sign in to comment.