f600b6e5d3
Lint is failing with some inscrutable panic (on a commit with no code changes). Let's try bumping the version in case they fixed it. Additionally, the new version's github action uses Go 1.19, which means it pulls in gofmt updates to match the new [doc-comment formatting rules][1]. So I added Go 1.19 to our list of versions to test (fixes #216) and updated some of our doc-comments to format better in the new world (mostly using the new link syntax). [1]: https://go.dev/doc/comment Test plan: make lint
46 lines
837 B
YAML
46 lines
837 B
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ "*" ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go: [ '1.16', '1.17', '1.18', '1.19' ]
|
|
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
id: go
|
|
|
|
- name: Git checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run tests
|
|
env:
|
|
# Needed for the example-test to run.
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
go test -cover -v ./...
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Git checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run lint
|
|
uses: golangci/golangci-lint-action@v2
|
|
with:
|
|
version: v1.48 # should match internal/lint/go.mod
|