Skip to content

Add Supports For Laravel 11 #24

Add Supports For Laravel 11

Add Supports For Laravel 11 #24

Workflow file for this run

name: Build
on:
push:
paths-ignore: ["*.md"]
pull_request:
paths-ignore: ["*.md"]
branches: [main]
jobs:
analysis:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.3]
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
coverage: none
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v4
env:
cache-name: laravel-varnishable-analysis
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
php-${{ matrix.php }}-build-${{ env.cache-name }}-
- name: Install composer dependencies
run: composer install --no-interaction --prefer-dist
- name: Run static analysis
run: composer analyse
test:
name: Test (PHP ${{ matrix.php }})
needs: [analysis]
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.0, 8.1, 8.2]
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
coverage: none
- name: Remove some dev dependencies
run: composer remove "ekino/phpstan-banned-code" "nunomaduro/larastan" "phpmd/phpmd" "phpstan/phpstan-deprecation-rules" --dev --no-update
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v4
env:
cache-name: laravel-varnishable-test
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
php-${{ matrix.php }}-build-${{ env.cache-name }}-
- name: Install composer dependencies
run: composer install --no-interaction --prefer-dist
- name: Run the test suite
run: vendor/bin/phpunit
test-coverage:
name: Test (PHP ${{ matrix.php }})
needs: [analysis]
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.3]
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
- name: Remove some dev dependencies
run: composer remove "ekino/phpstan-banned-code" "nunomaduro/larastan" "phpmd/phpmd" "phpstan/phpstan-deprecation-rules" --dev --no-update
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v4
env:
cache-name: laravel-varnishable-test
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
php-${{ matrix.php }}-build-${{ env.cache-name }}-
- name: Install composer dependencies
run: composer install --no-interaction --prefer-dist
- name: Run the Coverage test suite
run: vendor/bin/phpunit --coverage-clover=clover.xml
- name: Upload test coverage report to codecov.io
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash)