Skip to content

Various improvements (#171) #537

Various improvements (#171)

Various improvements (#171) #537

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.0, 8.1, 8.2]
symfony: ["4.4.*", "5.4.*", "6.0.*", "6.1.*", "6.2.*"]
exclude:
- php: 8.0
symfony: "6.1.*"
- php: 8.0
symfony: "6.2.*"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
extensions: ctype, iconv, intl, json, mbstring, pdo, pdo_sqlite
coverage: none
- name: Checkout Symfony 4.4 Sample
if: "matrix.symfony == '4.4.*'"
uses: actions/checkout@v2
with:
repository: Codeception/symfony-module-tests
path: framework-tests
ref: "4.4_codecept5"
- name: Checkout Symfony 5.4 Sample
if: "matrix.symfony == '5.4.*'"
uses: actions/checkout@v2
with:
repository: Codeception/symfony-module-tests
path: framework-tests
ref: "5.4_codecept5"
- name: Checkout Symfony 6.0 Sample
if: "matrix.symfony == '6.0.*'"
uses: actions/checkout@v2
with:
repository: Codeception/symfony-module-tests
path: framework-tests
ref: "6.0"
- name: Checkout Symfony 6.1 Sample
if: "matrix.symfony == '6.1.*'"
uses: actions/checkout@v2
with:
repository: Codeception/symfony-module-tests
path: framework-tests
ref: "6.1"
- name: Checkout Symfony 6.2 Sample
if: "matrix.symfony == '6.2.*'"
uses: actions/checkout@v2
with:
repository: Codeception/symfony-module-tests
path: framework-tests
ref: "6.2"
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2.1.3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
- name: Install PHPUnit 9 for Symfony 4.4, 5.4 and 6.0
if: "matrix.symfony == '4.4.*' || matrix.symfony == '5.4.*' || matrix.symfony == '6.0.*'"
run: composer require --dev --no-update "phpunit/phpunit=^9.0"
- name: Install dependencies
run: |
composer require symfony/finder=${{ matrix.symfony }} --no-update
composer require symfony/yaml=${{ matrix.symfony }} --no-update
composer require symfony/console=${{ matrix.symfony }} --no-update
composer require symfony/event-dispatcher=${{ matrix.symfony }} --no-update
composer require symfony/css-selector=${{ matrix.symfony }} --no-update
composer require symfony/dom-crawler=${{ matrix.symfony }} --no-update
composer require symfony/browser-kit=${{ matrix.symfony }} --no-update
composer require vlucas/phpdotenv --no-update
composer require codeception/module-asserts="3.*" --no-update
composer require codeception/module-doctrine2="3.*" --no-update
composer update --prefer-dist --no-progress --no-dev
- name: Validate composer.json and composer.lock
run: composer validate
working-directory: framework-tests
- name: Install PHPUnit 10 in framework-tests for Symfony 6.1 and 6.2
if: "matrix.symfony == '6.1.*' || matrix.symfony == '6.2.*'"
run: composer require --dev --no-update "phpunit/phpunit=^10.0"
working-directory: framework-tests
- name: Install Symfony Sample
run: |
composer remove codeception/codeception codeception/module-asserts codeception/module-doctrine2 codeception/lib-innerbrowser codeception/module-symfony --dev --no-update
composer update --no-progress
working-directory: framework-tests
- name: Prepare the test environment
run: |
php bin/console d:s:u -f
php bin/console d:f:l -q
working-directory: framework-tests
- name: Run test suite
run: |
php vendor/bin/codecept build -c framework-tests
php vendor/bin/codecept run Functional -c framework-tests