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 run: docker compose config --quiet - 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 image (build and smoke test) if: ${{ gitea.event_name == 'pull_request' }} runs-on: linux-arm64 steps: - uses: actions/checkout@v7 - name: Build run: docker build -t "urutau-ci:${{ gitea.run_id }}" . - name: Smoke test run: scripts/smoke-image.sh "urutau-ci:${{ gitea.run_id }}" - name: Clean up if: always() run: docker rmi -f "urutau-ci:${{ gitea.run_id }}" >/dev/null 2>&1 || true