diff --git a/.gitea/peppa-check.sh b/.gitea/peppa-check.sh new file mode 100755 index 0000000..b9b17d0 --- /dev/null +++ b/.gitea/peppa-check.sh @@ -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 }" +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" diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..1d9f557 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -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