feat: uninstall empty sections #18
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: Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**/README.md' | |
pull_request: | |
branches: | |
- '**' | |
paths-ignore: | |
- '**/README.md' | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: "Test PHP ${{ matrix.php }} with Symfony ${{ matrix.symfony_version }} and composer flags ${{ matrix.composer-flags }}" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: ['8.0', '8.1', '8.2', '8.3'] | |
symfony_version: ['5.4.*', '6.0.*', '6.1.*', '6.2.*' , '6.3.*', '6.4.*', '7.0.*'] | |
composer-flags: ['--prefer-stable'] | |
exclude: | |
- php: '8.0' | |
symfony_version: '6.1.*' # Requires PHP >= 8.1 for compatibility | |
- php: '8.0' | |
symfony_version: '6.2.*' # Requires PHP >= 8.1 for compatibility | |
- php: '8.0' | |
symfony_version: '6.3.*' # Requires PHP >= 8.1 for compatibility | |
- php: '8.0' | |
symfony_version: '6.4.*' # Requires PHP >= 8.1 for compatibility | |
- php: '8.0' | |
symfony_version: '7.0.*' # Requires PHP >= 8.2 for compatibility | |
- php: '8.1' | |
symfony_version: '7.0.*' # Requires PHP >= 8.2 for compatibility | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
id: setup-php | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip | |
tools: composer:v2 | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Install Flex and set Symfony version | |
if: ${{ matrix.symfony_version }} | |
run: | | |
composer global config --no-plugins allow-plugins.symfony/flex true | |
composer global require symfony/flex | |
composer config extra.symfony.require ${{ matrix.symfony_version }} | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir="$(composer config cache-files-dir)"" >> $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: "key-os-${{ runner.os }}-php-${{matrix.php}}-symfony-${{ matrix.symfony_version }}-composer-${{ hashFiles('composer.json') }}" | |
restore-keys: "key-os-${{ runner.os }}-php-${{matrix.php}}-symfony-${{ matrix.symfony_version }}-composer-" | |
- name: Remove ECS for PHP 8.0 | |
if: ${{ matrix.php == '8.0' }} | |
run: jq 'del(."require-dev"."symplify/coding-standard", ."require-dev"."symplify/easy-coding-standard")' --indent 4 composer.json > composer.json.tmp && mv composer.json.tmp composer.json | |
env: | |
SYMFONY_REQUIRE: ${{ matrix.symfony_version }} | |
- name: Install composer dependencies with nikic/php-parser:^4.0 | |
if: ${{ matrix.php == '8.0' }} | |
run: composer require --dev nikic/php-parser:^4.0 ${{ matrix.composer-flags }} | |
env: | |
SYMFONY_REQUIRE: ${{ matrix.symfony_version }} | |
- name: Install composer dependencies | |
if: ${{ matrix.php != '8.0' }} | |
run: composer update ${{ matrix.composer-flags }} | |
env: | |
SYMFONY_REQUIRE: ${{ matrix.symfony_version }} | |
- name: Launch test suite | |
run: make test | |
- name: Launch ECS | |
if: ${{ matrix.php != '8.0' }} | |
run: make ecs |