From b69641eb0ee809c25fa1c33292e412bd67eb9370 Mon Sep 17 00:00:00 2001 From: BitsHost Date: Wed, 29 Jul 2026 18:49:08 +0300 Subject: [PATCH] create ci.yml --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..31f7273 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + name: PHP ${{ matrix.php }} + runs-on: ubuntu-latest + # 8.4 reports but does not gate — see the kernel's workflow for why. + continue-on-error: ${{ matrix.php == '8.4' }} + + strategy: + fail-fast: false + matrix: + php: ['8.1', '8.2', '8.3', '8.4'] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up PHP ${{ matrix.php }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + tools: composer:v2 + + - name: Validate composer.json + run: composer validate --no-check-publish + + - name: Cache Composer packages + uses: actions/cache@v4 + with: + path: ~/.composer/cache + key: composer-${{ matrix.php }}-${{ hashFiles('composer.json') }} + restore-keys: composer-${{ matrix.php }}- + + # Deliberately resolves bitshost/upmvc from Packagist, not from a local + # path repository. This is the run that proves the pack works the way a + # stranger installs it — the failure mode that shipped a kernel without + # App\Etc\Application would have been caught here. + - name: Install dependencies + run: composer install --no-interaction --prefer-dist --no-progress + + - name: Show resolved kernel version + run: composer show bitshost/upmvc | head -n 5 + + - name: PHPStan + run: vendor/bin/phpstan analyse --no-progress + + - name: PHPUnit + run: vendor/bin/phpunit --display-all-issues