Skip to content

chore: release v0.19.0 #160

chore: release v0.19.0

chore: release v0.19.0 #160

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
repo-refs:
name: Repo reference guard
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for stale/broken repo slug references
run: ./scripts/check-repo-refs.sh
- name: Check the version is consistent everywhere it is written down
run: ./scripts/check-version.sh
lint-test:
name: Lint & Test
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: web/package-lock.json
# `make web-deps`, not a bare `npm ci`: `npm ci` refuses to run at all when
# web/package-lock.json does not match web/package.json, and the lock in this
# tree predates the vitest/eslint devDependencies. web-deps tries `npm ci`
# first and falls back to `npm install`, printing the real fix either way.
- name: Install web deps
run: make web-deps
- name: Build web UI into the go:embed directory
run: make ui-react
- name: Install golangci-lint
# `go install` (not the release install.sh + prebuilt binary) so the
# linter is always built with the SAME Go toolchain this job just set
# up — golangci-lint refuses to run when built with an older Go than
# the module it's targeting, so a prebuilt binary silently breaks
# every time the pinned toolchain in go.mod moves past it. install.sh
# also matched the wrong release asset for v2.13.1 (grabbed the
# .sbom.json instead of the tarball) and failed checksum verification.
run: |
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.1
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
- name: make check (fmt, vet, lint, unit+race tests, web lint+build)
run: make check
- name: Go Build
run: make build
- name: golangci-lint ratchet (blocking — the baseline is zero)
run: make lint-strict
- name: Studio API offline smoke test
run: ./scripts/e2e_prime_smoke.sh
race-and-coverage:
name: Race detector & coverage floor
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Race tests (pkg/...)
run: make race
- name: Coverage floor
run: make cover
web-check:
name: Web Frontend Check
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: web/package-lock.json
# `make web-deps`, not a bare `npm ci`: `npm ci` refuses to run at all when
# web/package-lock.json does not match web/package.json, and the lock in this
# tree predates the vitest/eslint devDependencies. web-deps tries `npm ci`
# first and falls back to `npm install`, printing the real fix either way.
- name: Install web deps
run: make web-deps
- name: Type check
run: cd web && npx tsc --noEmit
- name: Build web
run: cd web && npm run build
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: web/package-lock.json
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
# `make web-deps`, not a bare `npm ci`: `npm ci` refuses to run at all when
# web/package-lock.json does not match web/package.json, and the lock in this
# tree predates the vitest/eslint devDependencies. web-deps tries `npm ci`
# first and falls back to `npm install`, printing the real fix either way.
- name: Install web deps
run: make web-deps
- name: Build web UI into the go:embed directory
run: make ui-react
- name: Install golangci-lint
# `go install` (not the release install.sh + prebuilt binary) so the
# linter is always built with the SAME Go toolchain this job just set
# up — golangci-lint refuses to run when built with an older Go than
# the module it's targeting, so a prebuilt binary silently breaks
# every time the pinned toolchain in go.mod moves past it. install.sh
# also matched the wrong release asset for v2.13.1 (grabbed the
# .sbom.json instead of the tarball) and failed checksum verification.
run: |
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.1
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
- name: Run pre-commit
uses: pre-commit/action@v3.0.1