v2.1.0: add the archetype command line #751
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: tests | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Laravel 10 (testbench 8) | |
| - { php: '8.1', laravel: '10.*', testbench: '8.*', os: ubuntu-latest } | |
| - { php: '8.2', laravel: '10.*', testbench: '8.*', os: ubuntu-latest } | |
| - { php: '8.3', laravel: '10.*', testbench: '8.*', os: ubuntu-latest } | |
| # Laravel 11 (testbench 9) | |
| - { php: '8.2', laravel: '11.*', testbench: '9.*', os: ubuntu-latest } | |
| - { php: '8.3', laravel: '11.*', testbench: '9.*', os: ubuntu-latest } | |
| - { php: '8.4', laravel: '11.*', testbench: '9.*', os: ubuntu-latest } | |
| # Laravel 12 (testbench 10) | |
| - { php: '8.2', laravel: '12.*', testbench: '10.*', os: ubuntu-latest } | |
| - { php: '8.3', laravel: '12.*', testbench: '10.*', os: ubuntu-latest } | |
| - { php: '8.4', laravel: '12.*', testbench: '10.*', os: ubuntu-latest } | |
| # Laravel 13 (testbench 11, PHP 8.3+). statamic/cms 6 allows ^13.0, | |
| # so this is a version real downstream users are already on. | |
| - { php: '8.3', laravel: '13.*', testbench: '11.*', os: ubuntu-latest } | |
| - { php: '8.4', laravel: '13.*', testbench: '11.*', os: ubuntu-latest } | |
| # Keep an eye on the other host we claim to work on | |
| - { php: '8.4', laravel: '12.*', testbench: '10.*', os: macos-latest } | |
| name: PHP ${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd | |
| coverage: none | |
| ini-values: memory_limit=-1, error_reporting=E_ALL | |
| tools: composer:v2 | |
| - name: Determine composer cache directory | |
| id: composer-cache | |
| run: echo "directory=$(composer config cache-dir)" >> "$GITHUB_OUTPUT" | |
| - name: Cache dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.directory }} | |
| key: composer-${{ matrix.os }}-php${{ matrix.php }}-laravel${{ matrix.laravel }}-${{ hashFiles('composer.json') }} | |
| restore-keys: composer-${{ matrix.os }}-php${{ matrix.php }}-laravel${{ matrix.laravel }}- | |
| - name: Allow installing EOL Laravel branches | |
| # Laravel 10 and 11 are past security support, so every release in those | |
| # branches carries an open advisory and Composer 2.9+ declines to install | |
| # them at all. This is a compatibility matrix rather than a deployment, | |
| # and plenty of applications are still on those versions, so we want to | |
| # know whether Archetype works there. Laravel 12 installs unmodified. | |
| if: matrix.laravel != '12.*' | |
| run: composer config policy.advisories.block false | |
| - name: Install dependencies | |
| run: | | |
| composer require --dev --no-update --no-interaction \ | |
| "laravel/framework:${{ matrix.laravel }}" \ | |
| "orchestra/testbench:${{ matrix.testbench }}" | |
| composer update --prefer-dist --no-interaction --no-progress | |
| - name: Run tests | |
| run: vendor/bin/pest | |
| static-analysis: | |
| name: PHPStan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| coverage: none | |
| tools: composer:v2 | |
| - run: composer update --prefer-dist --no-interaction --no-progress | |
| - run: vendor/bin/phpstan analyse --no-progress |