Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com> Co-committed-by: dev_agent <dev_agent@cubecraftlabs.com>
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
# Runs on every push and pull request (no branch filter) so feature branches,
|
|
# their pull requests, and dev/main are all checked. Runs directly on the
|
|
# self-hosted act_runner; no container: key.
|
|
#
|
|
# The Makefile is the single build definition: CI runs `make test` and
|
|
# `make build` so it fails whenever either target would, and the binary
|
|
# carries the Makefile's -trimpath and version-stamped -ldflags (the
|
|
# `make build` log shows the -X main.version=... value). `make sqlc-check`
|
|
# fails when the committed internal/db code is stale against sqlc.yaml,
|
|
# migrations/ and migrations/queries/.
|
|
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: false
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: make test
|
|
run: make test
|
|
|
|
- name: make sqlc-check
|
|
run: |
|
|
make sqlc-install
|
|
make sqlc-check SQLC="$(go env GOPATH)/bin/sqlc"
|
|
|
|
- name: make build
|
|
run: make build
|