Skip to content

ci: add matrix entries for Symfony 7 & PHP 8.2 #121

ci: add matrix entries for Symfony 7 & PHP 8.2

ci: add matrix entries for Symfony 7 & PHP 8.2 #121

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
env:
PHPUNIT_FLAGS: -v
COMPOSER_MEMORY_LIMIT: -1
PHP_VERSION_DEFAULT: 8.0
NODE_VERSION: 14.x
jobs:
static_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION_DEFAULT }}
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- run: composer validate --strict
- run: composer install --prefer-dist --no-interaction --no-progress
- run: composer phpstan
- run: composer php-cs-fixer@ci
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn test
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
# Minimum supported dependencies with the latest and oldest PHP version
- PHP_VERSION: 7.4
COMPOSER_FLAGS: --prefer-stable --prefer-lowest
# Test the latest stable release
- PHP_VERSION: 7.4
- PHP_VERSION: 8.0
COVERAGE: true
PHPUNIT_FLAGS: -v --coverage-text
# Test specific Symfony versions
- PHP_VERSION: 7.4
SYMFONY_VERSION: 4.4.* # Last 4.x version
- PHP_VERSION: 7.4
SYMFONY_VERSION: 5.* # Last 5.x version
- PHP_VERSION: 8.0
SYMFONY_VERSION: 4.4.* # Last 4.x version
- PHP_VERSION: 8.0
SYMFONY_VERSION: 5.4.* # Last 5.4.x version
- PHP_VERSION: 8.0
SYMFONY_VERSION: 6.4.* # Last 6.1.x version
- PHP_VERSION: 8.0
SYMFONY_VERSION: 6.* # Last 6.x version
- PHP_VERSION: 8.1
SYMFONY_VERSION: 7.0.* # Last 7.0.x version
- PHP_VERSION: 8.1
STABILITY: dev
SYMFONY_VERSION: 7.0.* # Last 7.x version
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.config.PHP_VERSION }}
coverage: ${{ matrix.config.COVERAGE }}
- name: Install globally Symfony Flex
run: composer global require --no-progress --no-scripts --no-plugins symfony/flex
- name: Configure Composer minimum stability
if: matrix.config.STABILITY
run: composer config minimum-stability ${{ matrix.config.STABILITY }}
- name: Limit to specific Symfony version
if: matrix.config.SYMFONY_VERSION
run: echo "SYMFONY_REQUIRE=${{ matrix.config.SYMFONY_VERSION }}" >> $GITHUB_ENV
# Remove PSR-7 related things which are only needed for Cypress.
- run: |
rm fixtures/applications/Symfony/config/packages/nyholm_psr7.yaml
rm fixtures/applications/Symfony/config/packages/psr_http_message_bridge.yaml
composer remove --dev symfony/psr7-pack
- name: Install composer dependencies
run: composer update ${{ matrix.config.COMPOSER_FLAGS }} --prefer-dist --no-interaction --no-progress
- name: Run PHPUnit
run: composer phpunit -- ${{ matrix.config.PHPUNIT_FLAGS }}
- name: Run Behat
run: composer behat
cypress:
runs-on: ubuntu-latest
name: cypress
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION_DEFAULT }}
coverage: none
extensions: ctype, iconv, intl
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run Cypress
uses: cypress-io/github-action@v2
with:
start: composer server-start