Files
Ben Kraft 677fa94d30 Bump minimum Go version to 1.18 (#262)
This means we can use generics and various other things. I didn't use
any of them yet, this is just bumping the numbers. I added tests for
1.20, and fixed one small bug, I think caused by `go/packages` changes
therein. And I bumped the golangci-lint version too while I was in the
area.

Fixes #256, fixes #257.

I have:
- [x] Written a clear PR title and description (above)
- [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
- [x] Added tests covering my changes, if applicable
- [x] Included a link to the issue fixed, if applicable
- [x] Included documentation, for new features
- [x] Added an entry to the changelog
2023-04-08 16:48:34 -07:00

46 lines
831 B
YAML

name: Go
on:
push:
branches: [ "*" ]
pull_request:
branches: [ main ]
jobs:
build:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.18', '1.19', '1.20' ]
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.52.2 # should match internal/lint/go.mod