Bump gitlab.com/matthewhughes/go-cov from 0.5.0 to 0.6.0 #110
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: PR Checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| go_version: | |
| - "1.23" | |
| - "1.24" | |
| os: | |
| - windows-latest | |
| - ubuntu-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v3 | |
| - name: setup go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ matrix.go_version }} | |
| - name: run tests | |
| run: | | |
| go test -race -coverprofile cov.out ./... | |
| - name: check coverage | |
| shell: bash | |
| run: |- | |
| go run gitlab.com/matthewhughes/go-cov/cmd/go-cov add-skips cov.out > coverage.out | |
| go run gitlab.com/matthewhughes/go-cov/cmd/go-cov report --fail-under 100 coverage.out | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v3 | |
| - uses: pre-commit/[email protected] | |
| check-generated-code: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: setup go | |
| uses: actions/setup-go@v4 | |
| - name: generate code | |
| run: go generate ./... | |
| - name: check for changes in generated code | |
| run: | | |
| git add pkg | |
| if ! git diff --quiet -- pkg | |
| then | |
| echo 'changes detected from `go generate`' >&2 | |
| exit 1 | |
| fi | |