Skip to content

Commit

Permalink
github: Upload test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphexion committed Jul 6, 2021
1 parent e80df8a commit 51f604e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
go-version: [1.16.x]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -18,5 +18,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Test
- name: Test without coverage
run: go test ./...
if: ${{ runner.os != 'Linux' }}

- name: Test with coverage
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
if: ${{ runner.os == 'Linux' }}

- name: Upload test coverage
uses: codecov/codecov-action@v1
if: ${{ runner.os == 'Linux' }}
with:
files: ./coverage.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nina
coverage.txt

0 comments on commit 51f604e

Please sign in to comment.