Skip to content

Merge pull request #3465 from acrobat/generator-bundle-internal #2174

Merge pull request #3465 from acrobat/generator-bundle-internal

Merge pull request #3465 from acrobat/generator-bundle-internal #2174

Workflow file for this run

name: CI
on:
[push, pull_request]
jobs:
test:
name: '${{ matrix.deps }} | PHP ${{ matrix.php }} | Symfony ${{ matrix.symfony }}'
runs-on: ubuntu-latest
env:
SYMFONY_DEPRECATIONS_HELPER: "baselineFile=./.build/deprecations-baseline.json&max[self]=0"
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3']
deps: ['stable']
symfony: [''] # Don't lock to a specific symfony version by default
include:
# Test lowest dependencies
- deps: 'lowest'
php: '8.1'
# Test latest php with LTS versions.
- deps: 'lts'
php: '8.3'
symfony: '^6.4'
steps:
- uses: actions/checkout@v4
- name: Set-up env variables
run: |
case "${{ matrix.deps }}" in
"lowest")
echo "COMPOSER_FLAGS=--prefer-lowest" >> $GITHUB_ENV
echo "SYMFONY_REQUIRE=$(echo '${{ matrix.symfony }}')" >> $GITHUB_ENV
;;
*)
echo "SYMFONY_REQUIRE=$(echo '${{ matrix.symfony }}')" >> $GITHUB_ENV
esac
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: pecl,flex
extensions: imagick
- name: Set correct imagick policy
run: sudo sed -i -e 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="read|write" pattern="PDF" \/>/' /etc/ImageMagick-6/policy.xml
- name: Install Composer Dependencies
run: composer update --prefer-dist --no-progress $COMPOSER_FLAGS
- name: Run phpunit
run: vendor/bin/phpunit -v
validate_composer:
name: Validate composer files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sh ./.build/validate-composer.sh || exit $?