peppa/.gitea/workflows/ci.yml
peppa-bot b1946f041a
All checks were successful
peppa/lint lint: success за 2с
peppa/typecheck typecheck: success за 51с
peppa/build build: success за 36с
peppa/test test: success за 1567с
peppa-ci / ci (pull_request) Successful in 28m31s
PEP-301: шаг tools ставит tmux с повтором и падает явно, если не поставил
Прогон 293 упал без tmux: сбой apt-get update внутри a && b не роняет шаг под bash -e,
и все тесты агентов падали со spawn tmux ENOENT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:23:10 +00:00

61 lines
3.2 KiB
YAML

# CI for Peppa itself (PEP-22): glossary check, typecheck, web build and the e2e suite on mocks. Runs on Peppa's
# act_runner (`peppa-trusted`, registered for peppa-bot's repos, PEP-57); tmux and the openspec
# CLI are installed in the job. Each check is a step of the factory's own pipeline (PEP-57):
# the commands are `checks` in .peppa/project.json, .gitea/peppa-check.sh (the template's) sets
# the `peppa/<check>` commit status and reports to Peppa, so PEP tasks get the same card, review
# gate and red-check feedback as any factory project. `scripts/ci.sh` runs the same locally.
name: peppa-ci
on:
pull_request:
push:
branches: [main]
env:
PEPPA_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
PEPPA_BRANCH: ${{ github.head_ref || github.ref_name }}
PEPPA_PR: ${{ github.event.pull_request.number }}
PEPPA_CI_SECRET: ${{ secrets.PEPPA_CI_SECRET }}
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
ci:
# The runner has the host's docker.sock: only branches of this repository, never forks.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: peppa-trusted
timeout-minutes: 30
env:
# Peppa's data is SQLite (a temp file per test file). Postgres on the host is only the source
# for the Postgres → SQLite migration test, which makes and drops its own database.
PEPPA_TEST_PG: postgres://peppa:peppa@host.docker.internal:5433
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.PEPPA_SHA }}
- uses: actions/setup-node@v4
with:
node-version: "26"
- name: tools
run: |
# PEP-301: a failed `apt-get update` inside `a && b` does not stop a `bash -e` step — tmux was
# silently missing and every agent test fell with `spawn tmux ENOENT`. Retry, then fail here.
for i in 1 2 3; do apt-get update -qq && apt-get install -y -qq tmux >/dev/null && break; sleep 10; done
command -v tmux >/dev/null || { echo "tmux is not installed — the test step cannot run agents" >&2; exit 1; }
# Job-local prefix: the node toolcache is shared between jobs running at the same time
# (PR + push of one commit), and two global installs into it collide (ENOTEMPTY/EEXIST).
npm install -g --prefix "$RUNNER_TEMP/tools" pnpm@12.18.0 @fission-ai/openspec@2.0.0 >/dev/null
echo "$RUNNER_TEMP/tools/bin" >> "$GITHUB_PATH"
- id: install
name: install
run: bash .gitea/peppa-check.sh install
# PEP-124: the glossary check — a word from the «Нельзя» column of docs/glossary.md on a screen.
- name: lint
if: (success() || failure()) && steps.install.outcome == 'success'
run: bash .gitea/peppa-check.sh lint
- name: typecheck
if: (success() || failure()) && steps.install.outcome == 'success'
run: bash .gitea/peppa-check.sh typecheck
- name: build
if: (success() || failure()) && steps.install.outcome == 'success'
run: bash .gitea/peppa-check.sh build
- name: test
if: (success() || failure()) && steps.install.outcome == 'success'
run: bash .gitea/peppa-check.sh test