Skip to content

CI

CI #232

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 1,16 * *'
jobs:
symfony-version-tests:
name: "Test: PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- php: 7.4
symfony: 5.4.*
- php: 8.0
symfony: 5.4.*
- php: 8.1
symfony: 6.4.*
- php: 8.2
symfony: 6.4.*
- php: 8.2
symfony: 7.0.*
- php: 8.3
symfony: 7.0.*
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: flex
- name: Install symfony/mailer
run: composer require --dev "symfony/mailer" --no-update
- name: Install dependencies
uses: ramsey/composer-install@v2
with:
composer-options: --prefer-dist
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
- name: Run tests
run: vendor/bin/phpunit -v
prefer-lowest-tests:
name: "Test: prefer-lowest"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
coverage: none
- name: Install dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: lowest
composer-options: --prefer-dist
- name: Run tests
run: vendor/bin/phpunit -v
code-coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: xdebug
- name: Install symfony/mailer
run: composer require --dev "symfony/mailer" --no-update
- name: Install dependencies
uses: ramsey/composer-install@v2
with:
composer-options: --prefer-dist
- name: Run code coverage
run: vendor/bin/phpunit -v --coverage-text
composer-validate:
name: Validate composer.json
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
- name: Validate composer.json
run: composer validate --strict --no-check-lock
cs-check:
name: PHP Coding Standards
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
- name: Install dependencies
uses: ramsey/composer-install@v2
with:
composer-options: --prefer-dist
- name: Check CS
run: vendor/bin/php-cs-fixer fix --diff --dry-run --verbose