From f9c34a48a4d41be08f95b226de7044dc0410f0b7 Mon Sep 17 00:00:00 2001 From: myrmidex Date: Sun, 8 Mar 2026 12:30:37 +0100 Subject: [PATCH] 25 - Add CI workflow for lint, static analysis, and tests --- .forgejo/workflows/ci.yml | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .forgejo/workflows/ci.yml diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..670a3b8 --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: ['release/*'] + pull_request: + branches: [main] + +jobs: + ci: + runs-on: docker + container: + image: catthehacker/ubuntu:act-latest + steps: + - uses: https://data.forgejo.org/actions/checkout@v4 + + - name: Set up PHP + uses: https://data.forgejo.org/shivammathur/setup-php@v2 + with: + php-version: '8.3' + extensions: pdo_sqlite, mbstring, xml, dom + + - name: Cache Composer dependencies + uses: https://data.forgejo.org/actions/cache@v4 + with: + path: ~/.composer/cache + key: composer-${{ hashFiles('composer.lock') }} + restore-keys: composer- + + - name: Install dependencies + run: composer install --no-interaction --prefer-dist + + - name: Prepare environment + run: cp .env.testing .env + + - name: Lint + run: vendor/bin/pint --test + + - name: Static analysis + run: vendor/bin/phpstan analyse + + - name: Tests + run: php artisan test