support SF7 #59
Workflow file for this run
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 Tests" | |
on: | |
pull_request: | |
push: | |
env: | |
fail-fast: true | |
PHPUNIT_FLAGS: "-v" | |
jobs: | |
check-cs: | |
name: Check Coding Standards | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Composer | |
uses: php-actions/composer@v6 | |
- name: PHP-CS-Fixer | |
uses: docker://oskarstark/php-cs-fixer-ga | |
with: | |
args: --diff --dry-run --allow-risky yes | |
test: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.can-fail }} | |
name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}" | |
strategy: | |
matrix: | |
include: | |
- { os: ubuntu-20.04, php: 7.2, symfony: "5.4.*", composer-flags: "--prefer-stable --prefer-lowest", can-fail: false } | |
- { os: ubuntu-latest, php: 8.3, symfony: "6.4.*", composer-flags: "--prefer-stable", can-fail: false } | |
- { os: ubuntu-latest, php: 8.2, symfony: "6.3.*", composer-flags: "--prefer-stable", can-fail: false } | |
- { os: ubuntu-latest, php: 8.2, symfony: "6.4.*", composer-flags: "--prefer-stable", can-fail: false } | |
- { os: ubuntu-latest, php: 8.3, symfony: "7.0.*", composer-flags: "--prefer-stable", can-fail: false } | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Installing php" | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: curl,mbstring,xdebug | |
ini-values: date.timezone="Europe/Paris" | |
coverage: xdebug | |
tools: composer | |
- name: Show PHP version | |
run: php -v && composer -V | |
- name: "Cache Composer packages" | |
uses: "actions/cache@v3" | |
with: | |
path: "~/.composer/cache" | |
key: "php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('composer.json') }}-flags-${{ matrix.composer-flags }}" | |
restore-keys: "php-" | |
- name: Install dependencies | |
run: composer update ${{ matrix.composer-flags }} --prefer-dist | |
env: | |
SYMFONY_REQUIRE: "${{ matrix.symfony }}" | |
- name: Why composer | |
run: composer why symfony/console | |
- name: Run PHPUnit Tests | |
run: composer test |