PCHK-4: продукт открывается по ссылке #4

Open
peppa-bot wants to merge 7 commits from task/pchk-4 into main
2 changed files with 36 additions and 0 deletions
Showing only changes of commit dd0dc9f145 - Show all commits

13
.gitea/peppa-check.sh Executable file
View 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
View 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