Skip to content

#12 - check-path option addition (#14) #48

#12 - check-path option addition (#14)

#12 - check-path option addition (#14) #48

Workflow file for this run

name: "CI Tests"
on:
pull_request:
push:
env:
fail-fast: true
PHPUNIT_FLAGS: "-v"
jobs:
check-cs:
name: Check Coding Standards
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Composer
uses: php-actions/composer@v6
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --diff --dry-run --allow-risky yes
test:
runs-on: ${{ matrix.os }}
name: PHP v${{ matrix.php }}, Symfony v${{ matrix.symfony }} ${{ matrix.composer_flag }}
strategy:
matrix:
include:
- { os: ubuntu-latest, php: 7.4, symfony: "4.4.*", composer_flag: "--prefer-lowest"}
- { os: ubuntu-latest, php: 8.2, symfony: "4.4.*", composer_flag: ""}
- { os: ubuntu-latest, php: 7.4, symfony: "5.4.*", composer_flag: "--prefer-lowest"}
- { os: ubuntu-latest, php: 7.4, symfony: "5.4.*", composer_flag: ""}
- { os: ubuntu-latest, php: 8.1, symfony: "5.4.*", composer_flag: "--prefer-lowest"}
- { os: ubuntu-latest, php: 8.2, symfony: "5.4.*", composer_flag: ""}
- { os: ubuntu-latest, php: 8.2, symfony: "6.3.*@dev", composer_flag: ""}
steps:
- uses: actions/checkout@v3
- name: "Installing php"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl,mbstring,xdebug
ini-values: date.timezone="Europe/Paris"
coverage: xdebug
tools: composer
- name: Show PHP version
run: php -v && composer -V
- name: Download Composer cache dependencies from cache
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ matrix.os }}-composer-
- name: Set Composer stability
if: matrix.symfony == '6.3.*@dev'
run: composer config minimum-stability dev
- name: Install Symfony ${{ matrix.symfony }}
if: matrix.symfony != '6.3.*@dev'
run: composer require symfony/symfony:${{ matrix.symfony }} --no-update
- name: Fix PSR container compatibility
if: |
matrix.symfony == '5.4.*'
&& endsWith(matrix.composer_flag, 'prefer-lowest')
run: composer require psr/container:^1.1
- name: Silence Symfony deprecation helper for lower deps
if: endsWith(matrix.composer_flag, 'prefer-lowest')
run: echo "SYMFONY_DEPRECATIONS_HELPER=weak" >> $GITHUB_ENV
- name: Install dependencies
run: composer update --no-interaction ${{ matrix.composer_flag }} --prefer-dist --no-progress
- name: Run PHPUnit Tests
run: composer test