ci: setup CI/CD pipeline with Gitea Actions and secrets configuration

This commit is contained in:
2025-10-31 01:31:44 +01:00
parent 38baaca06b
commit 55c04e4fd0
28 changed files with 2113 additions and 958 deletions

View File

@@ -1,51 +0,0 @@
name: CI
on:
push:
pull_request:
jobs:
quality:
name: PHP Quality Checks
runs-on: ubuntu-latest
container:
image: composer:2
steps:
# Gitea runners usually have the repo checked out already. We avoid marketplace actions.
- name: Show versions
run: |
php -v
composer --version
- name: Install dependencies
run: |
composer install --no-interaction --prefer-dist --no-progress
- name: Code style (non-blocking for initial adoption)
run: |
if composer run -q cs 2>/dev/null; then
composer cs || true
else
echo "No 'cs' script found, skipping."
fi
- name: PHPStan
run: |
if composer run -q phpstan 2>/dev/null; then
composer phpstan
else
echo "No 'phpstan' script found, attempting vendor bin..."
./vendor/bin/phpstan analyse || exit 1
fi
- name: Pest tests
env:
XDEBUG_MODE: off
run: |
if [ -x ./vendor/bin/pest ]; then
./vendor/bin/pest -q
elif [ -x ./vendor/bin/phpunit ]; then
./vendor/bin/phpunit
else
echo "No test runner found."
exit 1
fi
- name: Composer audit (non-blocking initially)
run: |
composer audit --no-interaction || true