diff --git a/.claude/settings.json b/.claude/settings.json index de07a7b..8bf5bd2 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -3,7 +3,8 @@ "allow": [ "Bash(git status:*)", "Bash(git diff:*)", "Bash(git log:*)", "Bash(git show:*)", "Bash(git branch --list:*)", "Bash(git rev-parse:*)", - "Bash(git add:*)", "Bash(git commit:*)" + "Bash(git add:*)", "Bash(git commit:*)", + "Bash(bun install --frozen-lockfile)", "Bash(bun run typecheck)", "Bash(bun test:*)" ], "ask": [ "Bash(git push:*)", "Bash(git merge:*)", "Bash(git rebase:*)", "Bash(git switch:*)", diff --git a/.gemini/settings.json b/.gemini/settings.json index a5043be..b524764 100644 --- a/.gemini/settings.json +++ b/.gemini/settings.json @@ -3,7 +3,9 @@ "allowed": [ "run_shell_command(git status)", "run_shell_command(git diff)", "run_shell_command(git log)", "run_shell_command(git show)", "run_shell_command(git branch --list)", "run_shell_command(git rev-parse)", - "run_shell_command(git add)", "run_shell_command(git commit)" + "run_shell_command(git add)", "run_shell_command(git commit)", + "run_shell_command(bun install --frozen-lockfile)", "run_shell_command(bun run typecheck)", + "run_shell_command(bun test)" ], "exclude": [ "run_shell_command(git push --force)", "run_shell_command(git push -f)", diff --git a/.gitea/workflows/agent-docs.yml b/.gitea/workflows/agent-docs.yml new file mode 100644 index 0000000..2ff36ea --- /dev/null +++ b/.gitea/workflows/agent-docs.yml @@ -0,0 +1,22 @@ +name: agent-docs + +on: + push: + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Agent docs exist + run: | + for f in AGENTS.md CLAUDE.md GEMINI.md PRODUCT.md DESIGN.md docs/ARCHITECTURE.md docs/DECISIONS.md \ + docs/TODO.md docs/PERMISSIONS.md docs/CONTENT-CONTRACT.md docs/DEPLOY.md docs/specs/README.md docs/plans/README.md; do + test -f "$f" || { echo "missing: $f"; exit 1; } + done + - name: AGENTS.md under 150 lines + run: | + n=$(wc -l < AGENTS.md) + echo "AGENTS.md: $n lines" + test "$n" -le 150 diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..4351bb1 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,36 @@ +name: ci + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.3.14 + - run: bun install --frozen-lockfile + - run: bun run typecheck + - run: bun test + - run: bunx playwright install --with-deps chromium + - run: bunx playwright test + + image: + needs: test + runs-on: ubuntu-latest + env: + IMAGE: gitea.lucaswinther.info/lucasw89/portfolio-next + steps: + - uses: actions/checkout@v4 + - run: docker build --build-arg APP_VERSION=${{ github.sha }} -t "$IMAGE:${{ github.sha }}" . + # Task 14 adds the image smoke step: + # - run: scripts/smoke-test.sh "$IMAGE:${{ github.sha }}" + - if: github.ref == 'refs/heads/main' && github.event_name == 'push' + run: | + echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.lucaswinther.info -u "${{ github.repository_owner }}" --password-stdin + docker push "$IMAGE:${{ github.sha }}" + docker tag "$IMAGE:${{ github.sha }}" "$IMAGE:latest" + docker push "$IMAGE:latest" diff --git a/.gitignore b/.gitignore index 201f435..e02346e 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ CLAUDE.local.md # OS / editor .DS_Store *.log +.tmp/ +test-results/ +playwright-report/ diff --git a/AGENTS.md b/AGENTS.md index 2dd2911..cddae14 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,7 +9,12 @@ Deeper context on demand: `docs/ARCHITECTURE.md`, `docs/DECISIONS.md`, `docs/TOD ## Commands -TODO(maintainer): confirm commands once tooling exists (no `package.json` yet). +Verified in the scaffold task: +- `bun install --frozen-lockfile` — install from the lockfile +- `bun run typecheck` — `tsc --noEmit` +- `bun test` — whole suite (`bunfig.toml` roots it at `test/`) +- `bun test test/x.test.ts` — one file +- `bun test -t 'name'` — tests matching a name Bun is the runtime and package manager, never Node, npm, pnpm or yarn: `bun ` not `node`, `bun test` not jest/vitest, `bun install` / `bun run