Merge pull request #244 from carverauto/dependabot/go_modules/github.… #617
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-coverage | |
on: [push] | |
permissions: | |
contents: write | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run Tests with Coverage | |
run: | | |
go test -coverprofile=cover.out ./... | |
- name: check test coverage | |
uses: vladopajic/go-test-coverage@v2 | |
with: | |
config: ./.github/.testcoverage.yml | |
git-branch: badges | |
git-token: ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }} |