Merge pull request #258 from smlx/dependabot/github_actions/golangci/… #156
This file contains hidden or 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: coverage | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: {} | |
| jobs: | |
| coverage: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: stable | |
| - name: Calculate coverage | |
| run: | | |
| go test -v -covermode=atomic -coverprofile=cover.out -coverpkg=./... ./... | |
| - name: Generage coverage badge | |
| uses: vladopajic/go-test-coverage@cc5012c2cfa84542e02b079141958a885861d326 # v2.17.0 | |
| with: | |
| profile: cover.out | |
| local-prefix: github.com/${{ github.repository }} | |
| git-token: ${{ secrets.GITHUB_TOKEN }} | |
| # orphan branch for storing badges | |
| git-branch: badges |