From b6c0e1afe4fe37ebdf7bdeb6a7a18fd3578203ce Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 27 Feb 2024 16:28:09 +0000 Subject: [PATCH] Update GitHub Actions for Laravel 11 --- .github/workflows/ci.yml | 78 ++++++++++++++++++++++++++++++---------- 1 file changed, 60 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e309df..c4dc18a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,50 +8,92 @@ env: on: push: pull_request: - branches: [ master ] + branches: + - master jobs: pest: name: Tests (Pest) L${{ matrix.laravel }} + + + runs-on: ubuntu-latest + strategy: matrix: - laravel: [9, 10] + laravel: [9, 10, '11'] + + steps: - - uses: actions/checkout@v2 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - - name: Install composer dependencies - run: composer require "illuminate/support:^${{ matrix.laravel }}.0" - - name: Run tests - run: vendor/bin/pest + - uses: actions/checkout@v2 + + + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + + + + - name: Install composer dependencies + run: composer require "illuminate/support:^${{ matrix.laravel }}.0" + + + + - name: Run tests + run: vendor/bin/pest phpstan: name: Static analysis (PHPStan) + + + runs-on: ubuntu-latest + + steps: - - uses: actions/checkout@v2 - - name: Install composer dependencies - run: composer install - - name: Run phpstan - run: vendor/bin/phpstan analyse + - uses: actions/checkout@v2 + + + + - name: Install composer dependencies + run: composer install + + + + - name: Run phpstan + run: vendor/bin/phpstan analyse php-cs-fixer: name: Code style (php-cs-fixer) + + + runs-on: ubuntu-latest + + + steps: - uses: actions/checkout@v2 + + + - name: Install php-cs-fixer run: composer global require friendsofphp/php-cs-fixer + + + - name: Run php-cs-fixer run: $HOME/.composer/vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php + + + - name: Commit changes from php-cs-fixer uses: EndBug/add-and-commit@v5 with: - author_name: "PHP CS Fixer" - author_email: "phpcsfixer@example.com" + author_name: PHP CS Fixer + author_email: phpcsfixer@example.com message: Fix code style (php-cs-fixer)