Skip to content

Commit

Permalink
Add codecov as github action, set permissions to read content only
Browse files Browse the repository at this point in the history
Signed-off-by: Kenny Leung <[email protected]>
  • Loading branch information
k4leung4 committed Mar 1, 2022
1 parent 3a81b51 commit 183cee0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ env:
jobs:
unit-tests:
name: Run unit tests
permissions:
contents: read
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -55,7 +57,9 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
- name: Run Go tests
run: go test ./...
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload Coverage Report
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
- name: Run Go tests w/ `-race`
if: ${{ runner.os == 'Linux' }}
run: go test -race ./...
Expand Down

0 comments on commit 183cee0

Please sign in to comment.