Minor adjustments based on initial PR feedback #39
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: Tests | |
on: [push, pull_request] | |
env: | |
GOVERSION: "1.21" | |
jobs: | |
test: | |
name: Check code quality and run tests | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{env.GOVERSION}} | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Run gofmt | |
run: test -z "$(gofmt -s -d *.go 2>&1)" | |
- name: Run golint | |
run: go install golang.org/x/lint/golint@latest && golint -set_exit_status | |
- name: Run go vet | |
run: go vet | |
- name: Run tests | |
run: go test -v -coverprofile=coverage.out -covermode=count | |
- name: Report coverage | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: go install github.com/mattn/goveralls@latest && goveralls -coverprofile=coverage.out -service=github | |
continue-on-error: true |