Merge pull request #13 from devops-kung-fu/testfix #38
Workflow file for this run
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 Quality Checks | |
on: push | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- | |
name: Install Dependencies | |
run: | | |
go version | |
go install honnef.co/go/tools/cmd/staticcheck@latest | |
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest | |
- | |
name: Test | |
run: | | |
go test -v -coverprofile=coverage.out ./... | |
go tool cover -func=coverage.out | |
- | |
name: CodeCov | |
run: bash <(curl -s https://codecov.io/bash) | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- | |
name: Build | |
run: go build | |
- | |
name: Vet | |
run: go vet -v | |
- | |
name: staticcheck | |
run: staticcheck -f stylish -checks all ./... | |
- | |
name: gocyclo | |
run: gocyclo . | |