Files
genqlient/.github/workflows/go.yml
T
Ben Kraft e81d19c8be Upgrade golangci-lint (#182)
1.42 seems to be having some problems with Go 1.18 (see #2649), so let's
just upgrade to latest.  There was one new error, suggesting to use `%q`
rather than `"%s"`, since the former does escapes properly.  It doesn't
really matter for us -- the string should be an identifier -- but it
doesn't hurt.  (Plus it wanted us to upgrade from ioutil, which I did
in #181.)

Test plan: make check
2022-03-22 12:25:47 -07:00

46 lines
829 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' ]
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.45 # should match internal/lint/go.mod