Files
urutau/.gitea/workflows/ci.yml
T
Lucas RayanandClaude Opus 5.5 7c92d4b359
Release / Plan (reuse the published image?) (push) Successful in 5s
Release / ci (push) Skipped
Release / Build hub image (amd64) (push) Skipped
Release / Build probe image (amd64) (push) Skipped
Release / Build hub image (arm64) (push) Skipped
Release / Build probe image (arm64) (push) Skipped
Release / Publish tags (probe) (push) Successful in 16s
Release / Publish tags (hub) (push) Successful in 17s
Release / Gitea release (push) Skipped
ci: build and test each tree once
The release ran per ref, so main and a tag pushed together both planned
before any image existed and built everything twice; it also re-ran the
whole CI that the pull request had already passed on the same commit, and
the PR CI built the images a third time. Now: one release queue (the tag
waits for main and only re-points tags), the release skips CI when the
pull request already passed for this commit, and the PR CI no longer
builds images (the release builds once per input hash and smoke-tests
before publishing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 22:47:18 -03:00

85 lines
2.9 KiB
YAML

name: CI
on:
# Documentation-only or local agent state changes do not trigger CI jobs.
pull_request:
paths-ignore: ['**.md', 'docs/**', 'LICENSE*', '.gitignore', '.githooks/**', '.wolf/**', '.claude/**', '.opencode/**', '.codex/**', '.cursor/**', '.superpowers/**', '.superset/**', '.gitea/ISSUE_TEMPLATE/**', 'scripts/release-notes.sh', '.gitea/workflows/release.yml']
workflow_call:
concurrency:
group: ci-${{ gitea.ref }}
cancel-in-progress: true
env:
GOCACHE: /opt/hostedtoolcache/go-build
GOMODCACHE: /opt/hostedtoolcache/go-mod
GOPATH: /opt/hostedtoolcache/gopath
NPM_CONFIG_CACHE: /opt/hostedtoolcache/npm-cache
jobs:
lint:
name: Format and vet
runs-on: linux-arm64
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- uses: actions/setup-node@v7
with:
node-version: 22
- name: UI translation coverage
run: node scripts/check-ui-i18n.mjs
- name: Workflows and templates (valid YAML)
run: |
python3 -c 'import yaml' 2>/dev/null \
|| python3 -m pip install --quiet --user --break-system-packages pyyaml
python3 -c "
import glob, yaml
for f in glob.glob('.gitea/**/*.yml', recursive=True):
yaml.safe_load(open(f))
"
- name: Docker compose config (hub and probe)
run: |
docker compose config --quiet
URUTAU_HUB=https://hub.example.org URUTAU_PROBE_NAME=ci docker compose -f deploy/probe/docker-compose.yml config --quiet
- name: shellcheck (host kit)
# The job workspace is not visible to the runner's Docker daemon (DinD):
# copy the file into the container instead of bind mounting it.
run: |
cid=$(docker create -w /mnt koalaman/shellcheck:v0.10.0 install.sh)
docker cp deploy/host/install.sh "$cid:/mnt/install.sh"
docker start -a "$cid"; status=$?
docker rm "$cid" >/dev/null
exit "$status"
- name: gofmt
run: test -z "$(gofmt -l .)"
- run: go vet ./...
test:
name: Tests (Linux, race detector)
runs-on: linux-arm64
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- run: go test -race ./...
audit:
name: Dependency audit
runs-on: linux-arm64
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: govulncheck
run: |
command -v govulncheck >/dev/null || go install golang.org/x/vuln/cmd/govulncheck@latest
export PATH="$PATH:$(go env GOPATH)/bin"
govulncheck ./...
# No image build here: the release builds each image once per input hash,
# natively per architecture, and smoke-tests it before publishing any tag.