v1 lacked gcc, so 'go test -race' (in Makefile) failed in CI with 'go: -race requires cgo'. v2 of the runner image installs gcc, libc6-dev, and pkg-config.
38 lines
748 B
YAML
38 lines
748 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
# Bespoke runner image (Ubuntu 24.04 + make + git + node + go via
|
|
# actions/setup-go). See git.librete.ch/libretech/runner-image.
|
|
container:
|
|
image: git.librete.ch/libretech/runner-image:v2
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.22"
|
|
cache: true
|
|
|
|
- name: Verify modules
|
|
run: go mod download && go mod verify
|
|
|
|
- name: Vet
|
|
run: make lint
|
|
|
|
- name: Build
|
|
run: make build
|
|
|
|
- name: Test
|
|
run: make test
|