Skip to content

CI

CI #86

Workflow file for this run

name: CI
on:
pull_request: null
push:
branches:
- 1.x
schedule:
- cron: "48 7 * * 1"
jobs:
Tests:
runs-on: ubuntu-latest
strategy:
matrix:
php:
- '8.3'
- '8.2'
- '8.1'
- '8.0'
- '7.4'
dependencies: ['highest']
include:
- description: 'Symfony 6.4'
php: '8.2'
symfony_require: '^5.4'
- description: 'Symfony 5.4'
php: '8.1'
symfony_require: '^5.4'
- description: 'Symfony 4.4'
php: '7.4'
symfony_require: '^4.4'
- description: '(prefer lowest)'
php: '7.4'
symfony_require: '^4.4'
dependencies: 'lowest'
deprecations: 'disabled'
name: PHP ${{ matrix.php }} ${{ matrix.description }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: Restrict Symfony version
run: composer require "symfony/symfony:${{ matrix.symfony_require }}" --no-update
if: matrix.symfony_require
- name: Install dependencies
uses: "ramsey/composer-install@v3"
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml
env:
SYMFONY_DEPRECATIONS_HELPER: ${{ matrix.deprecations }}
- uses: codecov/codecov-action@v4
with:
file: './coverage.xml'
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
StaticAnalysis:
name: ${{ matrix.description }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- description: Validate composer.json
script: composer validate
- description: Code style
script: composer cs-check
- description: PHPStan
script: vendor/bin/phpstan analyze
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: Install dependencies
uses: "ramsey/composer-install@v3"
- run: ${{ matrix.script }}