Files
MealQuest/.gitea/workflows/ci.yml
T
dev_agentandClaude Opus 5.5 85ea9c5da4
CI / ci (push) Successful in 1m25s
Independent review Codex gpt-6-sol high: APPROVED (0 findings)
CI / ci (pull_request) Successful in 1m25s
Add sqlc configuration and core queries
sqlc.yaml (sqlite, schema migrations/, queries migrations/queries/)
generates internal/db with emit_interface. Queries cover dinners (create,
get, list by status, update, archive, set favorite), recipes with
ingredients and steps (upsert by source_url, get, replace children),
photos (insert, get by sha256) and get/upsert for the five settings
singletons. Repository tests run every query against a migrated temp
database.

make sqlc regenerates with the pinned sqlc v1.31.1 (dev tool only, not in
go.mod); make sqlc-check regenerates and fails on any drift in
internal/db, and CI runs it after make test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:11:18 -04:00

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