cdcd wip #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go test coverage check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
- name: generate test coverage | |
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./... | |
- name: check test coverage | |
uses: vladopajic/go-test-coverage@v2 | |
with: | |
profile: cover.out | |
local-prefix: github.com/carverauto/eventrunner | |
threshold-total: 95 | |
## when token is not specified (value '') this feature is turned off | |
## in this example badge is created and committed only for main branch | |
git-token: ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }} | |
## name of branch where badges are stored | |
## ideally this should be orphan branch (see below how to create this branch) | |
git-branch: badges |