Load constants from AsTwigConstant attribute #66
This file contains 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 ] | |
jobs: | |
cs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
coverage: xdebug | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Dependencies | |
run: composer install --prefer-dist --no-interaction --optimize-autoloader | |
- name: Run PHPStan | |
run: vendor/bin/php-cs-fixer fix --dry-run --diff | |
phpstan: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
coverage: xdebug | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Dependencies | |
run: composer install --prefer-dist --no-interaction --optimize-autoloader | |
- name: Run PHPStan | |
run: vendor/bin/phpstan | |
phpunit: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
composer-prefs: [ '--prefer-stable', '--prefer-lowest' ] | |
php-version: [ '8.1', '8.2', '8.3' ] | |
symfony-version: [ '5.4.*' ] | |
include: | |
- php-version: 8.3 | |
symfony-version: 6.4.* | |
- php-version: 8.3 | |
symfony-version: 7.0.* | |
- php-version: 8.3 | |
symfony-version: 7.1.* | |
name: 'PHPUnit - PHP/${{ matrix.php-version }} - SF/${{ matrix.symfony-version }} ${{ matrix.composer-prefs }}' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
coverage: xdebug | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ matrix.php-version }}-${{ matrix.symfony-version }}-${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- run: composer global config --no-plugins allow-plugins.symfony/flex true | |
- run: composer global require --no-progress --no-scripts --no-plugins symfony/flex | |
- run: composer update --prefer-dist --no-interaction ${{ matrix.composer-prefs }} | |
env: | |
SYMFONY_REQUIRE: ${{ matrix.symfony-version }} | |
- name: PHPUnit | |
run: vendor/bin/phpunit |