CI / Format and vet (pull_request) Successful in 1m9s
CI / Dependency audit (pull_request) Successful in 32s
CI / Tests (Linux, race detector) (pull_request) Successful in 2m2s
CI / Docker images (build and smoke test) (pull_request) Successful in 50s
Release / Build probe image (arm64) (push) Failing after 21s
Release / Plan (reuse the published image?) (push) Successful in 5s
Release / ci (push) Successful in 2m15s
Release / Build hub image (arm64) (push) Successful in 24s
CI / Format and vet (push) Successful in 1m3s
CI / Tests (Linux, race detector) (push) Successful in 1m46s
CI / Dependency audit (push) Successful in 29s
CI / Docker images (build and smoke test) (push) Skipped
Release / Build hub image (amd64) (push) Successful in 21s
Release / Build probe image (amd64) (push) Failing after 20s
Release / Publish tags (hub) (push) Skipped
Release / Publish tags (probe) (push) Skipped
Release / Gitea release (push) Skipped
The probe image linked the whole hub (24 MB uncompressed, over the 15 MB limit). cmd/urutau-probe links only probeagent, tail and wire (6.8 MB); 'urutau probe' still works and shares probeagent.Main. The shellcheck step bind-mounted the workspace, which the runner's DinD daemon cannot see. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
100 lines
3.5 KiB
YAML
100 lines
3.5 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 ./...
|
|
|
|
image:
|
|
name: Docker images (build and smoke test)
|
|
if: ${{ gitea.event_name == 'pull_request' }}
|
|
runs-on: linux-arm64
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Build hub
|
|
run: docker build --target hub -t "urutau-ci:${{ gitea.run_id }}" .
|
|
- name: Build probe
|
|
run: docker build --target probe -t "urutau-probe-ci:${{ gitea.run_id }}" .
|
|
- name: Smoke test (hub)
|
|
run: scripts/smoke-image.sh "urutau-ci:${{ gitea.run_id }}"
|
|
- name: Smoke test (probe, under 15 MB)
|
|
run: scripts/smoke-probe.sh "urutau-probe-ci:${{ gitea.run_id }}"
|
|
- name: Clean up
|
|
if: always()
|
|
run: docker rmi -f "urutau-ci:${{ gitea.run_id }}" "urutau-probe-ci:${{ gitea.run_id }}" >/dev/null 2>&1 || true
|