Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add support for alternatiwe image formats like webp and avif #783

Add support for alternatiwe image formats like webp and avif

Add support for alternatiwe image formats like webp and avif #783

Workflow file for this run

name: PHPUnit
on:
pull_request:
push:
branches:
- 1.x
- 2.x
jobs:
phpunit:
name: "PHP ${{ matrix.php }} + ${{ matrix.dependencies }} dependencies + Symfony ${{ matrix.symfony }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
dependencies: [highest]
symfony: ['*']
include:
# Minimum supported dependencies with the oldest supported PHP version
- php: '8.0'
dependencies: lowest
symfony: '*'
# Minimum supported dependencies with the latest supported PHP version
- php: '8.5'
dependencies: lowest
symfony: '*'
# Test each supported Symfony version with the lowest supported PHP version
- php: '8.1'
dependencies: highest
symfony: '6.4.*'
- php: '8.2'
dependencies: highest
symfony: '7.4.*'
- php: '8.4'
dependencies: highest
symfony: '8.*'
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Configure coverage driver
id: coverage
run: echo ::set-output name=driver::xdebug
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: ${{ steps.coverage.outputs.driver }}
extensions: gd, imagick
- name: Install symfony/flex
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-interaction --no-progress symfony/flex
- name: Remove enqueue/enqueue-bundle for Symfony 8
if: matrix.symfony == '8.0.*'
run: composer remove --no-update enqueue/enqueue-bundle --dev
- name: Add asset mapper
# asset mapper support is optional in LiipImagineBundle. asset mapper was only added in Symfony 6
if: ${{ matrix.symfony >= '6.4' }}
run: composer require --no-update symfony/asset-mapper --dev
- name: Update project dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
- name: Lint container
run: ./Tests/Functional/app/bin/console lint:container
- name: Cache PHPUnit
uses: actions/cache@v3
with:
path: vendor/bin/.phpunit
key: ${{ runner.os }}-phpunit-${{ matrix.php }}
- name: Install PHPUnit
run: vendor/bin/simple-phpunit install
- name: Run PHPUnit tests
env:
SYMFONY_DEPRECATIONS_HELPER: max[self]=0
run: vendor/bin/simple-phpunit -v
- name: Install php-coveralls
run: composer global require --no-interaction --no-progress php-coveralls/php-coveralls
- name: Upload coverage results to Coveralls
uses: nick-invision/retry@v2
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "PHP ${{ matrix.php }} + ${{ matrix.dependencies }} dependencies + Symfony ${{ matrix.symfony }}"
with:
timeout_seconds: 60
max_attempts: 3
command: php-coveralls -x var/build/clover.xml -o var/build/upload.json -v
coveralls-finish:
needs: [phpunit]
runs-on: ubuntu-latest
steps:
- name: Notify Coveralls when build is finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true