ethan zhou b0290fcd7b CI: gofmt gate, race detector, macOS matrix
- New `format` job fails if anything is not gofmt-formatted (the repo is clean
  now, so this stays green and prevents drift).
- Test step runs with -race.
- build/vet/test run on ubuntu and macos (IPA/plist parsing is platform-relevant).

golangci-lint is intentionally left out for now: it is not verifiable locally
here, and the never-linted code would likely make CI red. Tracked as a
follow-up (wire the existing Makefile `lint` target once a .golangci.yml
baseline exists).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 13:40:53 -07:00

48 lines
878 B
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: gofmt
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "These files are not gofmt-formatted (run: gofmt -w .):"
echo "$unformatted"
exit 1
fi
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Vet
run: go vet ./...
- name: Build
run: go build ./...
- name: Test
run: go test -race ./...