peppa/.gitea/workflows/ci.yml
Асель c47a26745d PEP-124: glossary check in CI — pnpm lint, checks.lint, the lint step of the workflow and ci.sh
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 21:18:44 +05:00

58 lines
2.8 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: |
apt-get update -qq && apt-get install -y -qq tmux >/dev/null
# 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