Jamie Holdstock a5998264b3
Include commit ID in build info. (#357)
* ci: Update GitHub actions and linter.

* Update go deps.

* Include commit ID in build info.

Introduced in go 1.18, debug.ReadBuildInfo allows a go process to discover the git commit it was built from.
2022-11-18 15:06:00 -05:00

26 lines
719 B
YAML

name: Build and Test
on: [push, pull_request]
jobs:
build:
name: Go CI
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.18, 1.19]
steps:
- name: Set up Go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f #v3.3.1
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0
- name: Build
run: go build ./...
- name: Test
run: env GORACE="halt_on_error=1" go test -race ./...
- name: Lint
uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 #v3.3.1
with:
version: v1.50.1