Merge pull request #203 from jackmcguire1/patch-1 #445
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 and Coverage | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: Check for linting issues | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19.x | |
- name: Lint | |
run: | | |
go vet . | |
build: | |
needs: lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: | |
- 1.19.x | |
- 1.18.x | |
name: Test with Go v${{ matrix.go }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Setup | |
run: | | |
go install github.com/mattn/goveralls@latest | |
- name: Test | |
run: | | |
go test -v -parallel=10 -covermode=count -coverprofile=coverage.out | |
- name: Send coverage | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
goveralls -coverprofile=coverage.out -service=github |