Do not synchronize package.json if symfony/flex is not installed #609
Workflow file for this run
This file contains hidden or 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: | |
pull_request: | |
push: | |
branches: | |
- '1.x' | |
- '2.x' | |
env: | |
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit" | |
jobs: | |
tests: | |
name: "PHP ${{ matrix.php }} ${{ matrix.mode }}" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- php: '8.0' | |
composer: 2.2.x | |
- php: '8.1' | |
- php: '8.2' | |
- php: '8.3' | |
- php: '8.4' | |
- php: '8.1' | |
mode: low-deps | |
steps: | |
- name: "Checkout code" | |
uses: actions/checkout@v4 | |
- name: "Install PHP" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: "none" | |
php-version: ${{ matrix.php }} | |
tools: composer:${{ matrix.composer }} | |
- if: matrix.php == '8.0' | |
name: "Lint PHP files" | |
run: | | |
find src/ -name '*.php' | xargs -n1 php -l | |
find tests/ -name '*.php' | xargs -n1 php -l | |
- name: "Validate composer.json" | |
run: "composer validate --strict --no-check-lock" | |
- name: "Install dependencies" | |
run: | | |
if [[ "${{ matrix.mode }}" = low-deps ]]; then | |
composer u --prefer-lowest --prefer-stable --ansi | |
else | |
composer u --ansi | |
fi | |
- name: "Install PHPUnit" | |
run: vendor/bin/simple-phpunit install | |
- run: vendor/bin/simple-phpunit |