Bump test to 8.1 as the base #36
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: Tests | |
# Ensure tests pass whatever is the minor PHP version currently supported (see strategy.matrix.php) | |
# crossed with "lowest" setup (install the lowest possible dependency versions allowed by the range) | |
# and with "stable" setup (install the highest possible dependency stable versions allowed by the range) | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ '8.1', '8.2', '8.3', '8.4' ] | |
setup: [ 'lowest', 'stable' ] | |
name: PHP ${{ matrix.php }} - ${{ matrix.setup }} | |
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 }}-${{ matrix.setup }}-${{ hashFiles('composer.lock') }} | |
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-${{ matrix.setup }}- | |
- name: Cache test packages | |
id: composer-test-cache | |
uses: actions/cache@v3 | |
with: | |
path: src/test/vendor | |
key: ${{ runner.os }}-php-test-${{ matrix.php }}-${{ matrix.setup }}-${{ hashFiles('src/test/composer.lock') }} | |
restore-keys: ${{ runner.os }}-php-test-${{ matrix.php }}-${{ matrix.setup }}- | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: composer update --prefer-dist --no-progress --prefer-${{ matrix.setup }} | |
- 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 |