Merge pull request #37 from exonet/feature/v2-modernization #68
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| run-tests: | |
| name: Tests (PHP ${{ matrix.php }}, testbench ${{ matrix.testbench }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ["8.2", "8.3", "8.4"] | |
| # orchestra/testbench 10 = Laravel 12, 11 = Laravel 13. | |
| testbench: ["^10.0", "^11.0"] | |
| exclude: | |
| # orchestra/testbench 11 (Laravel 13) requires PHP >= 8.3. | |
| - php: "8.2" | |
| testbench: "^11.0" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: sodium | |
| coverage: none | |
| - name: Select testbench version | |
| run: composer require --dev --no-update "orchestra/testbench:${{ matrix.testbench }}" | |
| - name: Install dependencies | |
| run: composer update --prefer-dist --no-interaction --no-progress | |
| - name: Run unit tests | |
| run: vendor/bin/phpunit --testdox | |
| static-analysis: | |
| name: Static analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| extensions: sodium | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer update --prefer-dist --no-interaction --no-progress | |
| - name: Run PHPStan | |
| run: vendor/bin/phpstan analyse --no-progress | |
| check-code-style: | |
| name: Check code style | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Run php-cs-fixer | |
| uses: docker://oskarstark/php-cs-fixer-ga | |
| - name: Apply php-cs-fixer changes | |
| uses: stefanzweifel/git-auto-commit-action@v6 | |
| with: | |
| commit_message: Apply php-cs-fixer changes |