From 59e07152275d433e6dfbd349f39c488beccf91bb Mon Sep 17 00:00:00 2001 From: Koen Eelen Date: Thu, 21 Mar 2024 14:18:52 +0100 Subject: [PATCH] add PHP 8.0 to github actions --- .github/workflows/ci.yml | 60 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b756514..df107ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['7.4'] + php-versions: ['7.4', '8.0'] name: PHP ${{ matrix.php-versions }} steps: - name: πŸ“€ Checkout project @@ -97,5 +97,63 @@ jobs: if: steps.composer-cache.outputs.cache-hit != 'true' run: composer install --no-progress --no-suggest + - name: πŸ” Run static analysis + run: composer phpstan + + cs-php80: + runs-on: ubuntu-latest + name: Code style (PHP 8.0) + steps: + - name: πŸ“€ Checkout project + uses: actions/checkout@v2 + + - name: 🐘 Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.0 + tools: composer + + - name: πŸ“© Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: πŸ“¦ Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer install --no-progress --no-suggest + + - name: ✨ Run code style check + run: composer cs + + phpstan-php80: + runs-on: ubuntu-latest + name: Static analysis (PHP 8.0) + steps: + - name: πŸ“€ Checkout project + uses: actions/checkout@v2 + + - name: 🐘 Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.0 + tools: composer + + - name: πŸ“© Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: πŸ“¦ Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer install --no-progress --no-suggest + - name: πŸ” Run static analysis run: composer phpstan \ No newline at end of file