Skip to content

Bump test to 8.1 as the base #11

Bump test to 8.1 as the base

Bump test to 8.1 as the base #11

Workflow file for this run

name: Symfony
# Ensure tests pass whatever is the major version of Symfony installed
# along with the library
# Guarantee to users that it can be installed and ran with no conflict
# in a composer project that also include Symfony dependencies
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ 8.3 ]
symfony: [ 2, 3, 4, 5, 6, 7 ]
name: Symfony ${{ matrix.symfony }}
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, imagick
tools: composer:v2
coverage: none
- name: Imagick SVG support
continue-on-error: true
run: sudo apt-get install libmagickcore-6.q16-3-extra
- name: Cache library packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-
- name: Cache test packages
id: composer-test-cache
uses: actions/cache@v3
with:
path: src/test/vendor
key: ${{ runner.os }}-php-${{ matrix.php }}-symfony-test-${{ matrix.symfony }}-${{ hashFiles('src/test/composer.lock') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-symfony-test-${{ matrix.symfony }}-
- name: Set Symfony version
run: |
composer require --no-update --no-interaction \
symfony/dependency-injection:^${{ matrix.symfony }} \
symfony/filesystem:^${{ matrix.symfony }} \
symfony/config:^${{ matrix.symfony }}
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --prefer-dist --no-progress --prefer-stable --ignore-platform-req=php+
- name: Install test dependencies
if: steps.composer-test-cache.outputs.cache-hit != 'true'
run: cd src/test && composer update --prefer-dist --no-progress --prefer-stable --ignore-platform-req=php+
- name: Fix PHP compatibility
if: steps.composer-test-cache.outputs.cache-hit != 'true'
run: php src/test/php/PDepend/fix-php-compatibility.php
- name: Check Symfony version
run: php src/test/symfony-version.php
- name: Run test suite
run: src/test/vendor/bin/phpunit -v