Skip to content

Add Support for Symfony 7 #103

Add Support for Symfony 7

Add Support for Symfony 7 #103

name: Test application
on:
pull_request:
push:
branches:
- '[0-9]+.[0-9]+'
- '[0-9]+.x'
jobs:
php:
name: 'Run tests with php ${{ matrix.php-version }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: '8.0'
lint: false
symfony-version: '^2.8'
- php-version: '8.0'
lint: false
symfony-version: '^3.4'
- php-version: '8.0'
lint: false
symfony-version: '^4.4'
- php-version: '8.0'
lint: true
symfony-version: '^5.0'
- php-version: '8.1'
lint: true
symfony-version: '^5.4'
- php-version: '8.0'
lint: true
symfony-version: '^6.0'
- php-version: '8.1'
lint: true
symfony-version: '^6.0'
- php-version: '8.2'
lint: true
symfony-version: '^6.0'
- php-version: '8.2'
lint: true
symfony-version: '^7.0'
- php-version: '8.3'
lint: true
symfony-version: '^7.0'
- php-version: '8.4'
lint: true
symfony-version: '^7.0'
composer-options: '--ignore-platform-reqs'
services:
elasticsearch:
image: elasticsearch:7.5.2
ports:
- 9200:9200
env:
discovery.type: 'single-node'
xpack.security.enabled: 'false'
options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Install and configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: 'composer'
- name: Get composer cache directory
id: composer-cache-dir
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
id: composer-cache
with:
path: ${{ steps.composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer validate --strict
composer require --no-update symfony/symfony:${{ matrix.symfony-version }}
composer update --no-interaction --prefer-dist ${{ matrix.compser-options }}
- name: Fix code style
if: ${{ matrix.lint }}
run: vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor/ ./
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Code Coverage Upload
run: curl -s https://codecov.io/bash