PCHK-3: CI — .gitea/workflows/ci.yml и peppa-check.sh (в основной ветке их нет)
Some checks failed
ci / checks (pull_request) Has been cancelled
Some checks failed
ci / checks (pull_request) Has been cancelled
Шаблонный CI не попал в репозиторий при бутстрапе, поэтому проверки PR не стартовали. Workflow запускает install/lint/typecheck/test/build из .peppa/project.json → checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ef85f383d8
commit
dd0dc9f145
13
.gitea/peppa-check.sh
Executable file
13
.gitea/peppa-check.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
# Запуск одной проверки из .peppa/project.json → checks (install|lint|typecheck|test|build).
|
||||
# Нет команды — шаг пропускается. Тот же скрипт используют CI и агенты локально.
|
||||
set -euo pipefail
|
||||
name="${1:?usage: peppa-check.sh <install|lint|typecheck|test|build>}"
|
||||
cd "$(dirname "$0")/.."
|
||||
cmd="$(node -e 'const c=(require("./.peppa/project.json").checks||{})[process.argv[1]];process.stdout.write(c||"")' "$name")"
|
||||
if [ -z "$cmd" ]; then
|
||||
echo "peppa-check: '$name' не настроен — пропуск"
|
||||
exit 0
|
||||
fi
|
||||
echo "peppa-check: $name → $cmd"
|
||||
bash -c "$cmd"
|
||||
23
.gitea/workflows/ci.yml
Normal file
23
.gitea/workflows/ci.yml
Normal file
@ -0,0 +1,23 @@
|
||||
name: ci
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- name: install
|
||||
run: bash .gitea/peppa-check.sh install
|
||||
- name: lint
|
||||
run: bash .gitea/peppa-check.sh lint
|
||||
- name: typecheck
|
||||
run: bash .gitea/peppa-check.sh typecheck
|
||||
- name: test
|
||||
run: bash .gitea/peppa-check.sh test
|
||||
- name: build
|
||||
run: bash .gitea/peppa-check.sh build
|
||||
Loading…
Reference in New Issue
Block a user