- scripts/ portados do teqo e adaptados (sem DB — SPA): worktree (next/plan/new/kill,
claim + branch <code>-<slug> + bun install), issue, agent:{claim,register,ready,
file-miss,status}, pr (cria PR + auto-merge sem gh), transitions de CI
- config por projeto em .forgejo/worktree.env (FORGEJO_REPOSITORY, WORKTREES_ROOT)
+ roteador global de terminal em ~/.config/shell/worktree.sh (escopo por git rev-parse)
- .opencode/commands e .agents/skills (plan-issue, work-issue, capture-review-debts,
worktree-next-issue, code-simplification) + AGENTS.md com o workflow
- CI Forgejo Actions unificado: checks (lint+build+e2e) em PR e main; deploy
gated; issue-done / plan-issue-ready / agent-pr-automerge workflows
- Playwright: config + 2 specs smoke (settings→chat, ws reconnect) — e2e só no CI
- package.json: aliases worktree/issue/agent:*/pr + gate + test:e2e
71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
name: CI
|
|
|
|
# PR gate + post-merge verifier + deploy:
|
|
# - PRs (feature → main) rodam `checks` (lint + build + e2e) — o branch
|
|
# protection em `main` exige o status `checks` para merge.
|
|
# - Push em `main` (merge dos PRs) roda `checks` de novo e depois `deploy`
|
|
# (rsync do dist/ para o homeserver). Deploy é gated em `checks`.
|
|
#
|
|
# Runner: host (workstation). Sem Postgres/serviços — Iara é um SPA.
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
checks:
|
|
name: checks
|
|
runs-on: host
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Instalar bun
|
|
run: |
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
bun --version
|
|
|
|
- name: Instalar dependências
|
|
run: |
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
bun install --frozen-lockfile
|
|
|
|
- name: Lint
|
|
run: |
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
bun run lint
|
|
|
|
- name: Build (tsc + vite)
|
|
run: |
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
bun run build
|
|
|
|
- name: Instalar navegador do Playwright
|
|
run: |
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
bunx playwright install chromium
|
|
|
|
- name: E2E (Playwright — só aqui, nunca local)
|
|
run: |
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
bun run test:e2e
|
|
|
|
deploy:
|
|
runs-on: host
|
|
needs: checks
|
|
if: github.ref == 'refs/heads/main'
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Build e deploy
|
|
run: |
|
|
set -e
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
rm -rf /tmp/iara-build
|
|
git clone -q --depth 1 -b main https://git.solla.dev/amana/iara-pwa.git /tmp/iara-build
|
|
cd /tmp/iara-build
|
|
bun install --frozen-lockfile
|
|
bun run build
|
|
rsync -az --delete dist/ homeserver:~/iara-pwa/dist/
|
|
echo "deploy concluido em $(date -u +%H:%M:%SZ)"
|