Merge pull request #196 from smlx/deduplicate-build #121
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.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@c7fe52e0f48e0fbed8c1812824c5346218443c70 # v2.10.2 | |
| with: | |
| profile: cover.out | |
| local-prefix: github.com/${{ github.repository }} | |
| git-token: ${{ secrets.GITHUB_TOKEN }} | |
| # orphan branch for storing badges | |
| git-branch: badges |