chore(deps): update module github.com/vektra/mockery/v2 to v2.46.3 (#17) #132
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.22', '1.*' ] | |
name: Tests | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Test | |
run: CGO_ENABLED=1 go test -race ./... | |
coverage: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.*' ] | |
name: Coverage Report | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Test | |
run: | | |
CGO_ENABLED=1 go run gotest.tools/[email protected] --junitfile test.xml --format testname -- -coverprofile coverage.txt -race ./... | |
go run github.com/boumenot/[email protected] -ignore-gen-files -by-files < coverage.txt > coverage.xml | |
- name: Code Coverage Summary Report | |
uses: irongut/[email protected] | |
with: | |
filename: coverage.xml | |
badge: true | |
fail_below_min: false | |
format: markdown | |
hide_branch_rate: true | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: '50 75' | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
continue-on-error: true | |
with: | |
recreate: true | |
path: code-coverage-results.md | |
static-checks: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.*' ] | |
name: Static checks | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Go Vet | |
run: go vet ./... | |
- name: Go Fmt | |
run: | | |
fmt=$(gofmt -l .) | |
test -z $fmt || (echo "please run gofmt" ; echo $fmt ; exit 1) | |
- name: Goimports | |
run: | | |
go run golang.org/x/tools/cmd/goimports@latest -w . | |
git diff --quiet || (echo 'goimports requires code cleanup:' ; git diff ; exit 1) | |
- name: Go Generate | |
run: | | |
go generate ./... | |
git diff --quiet || (echo 'generated go files are not up-to-date, check go generate, go.sum and go.mod:' ; git diff ; exit 1) |