Merge branch '3.x' into 4.x #2546
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI" | |
on: | |
pull_request: | |
push: | |
branches: | |
- '4.x' | |
env: | |
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1 | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
name: "PHP ${{ matrix.php-version }}" | |
runs-on: 'ubuntu-latest' | |
strategy: | |
matrix: | |
php-version: | |
- '8.2' | |
- '8.3' | |
- '8.4' | |
steps: | |
- name: "Checkout code" | |
uses: actions/checkout@v4 | |
- name: "Install PHP with extensions" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: "none" | |
php-version: ${{ matrix.php-version }} | |
ini-values: memory_limit=-1 | |
tools: phpunit:11.3 | |
- name: "Add PHPUnit matcher" | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- run: composer install | |
- name: "Run tests" | |
run: phpunit | |
extension-tests: | |
needs: | |
- 'tests' | |
name: "${{ matrix.extension }} PHP ${{ matrix.php-version }}" | |
runs-on: 'ubuntu-latest' | |
continue-on-error: true | |
strategy: | |
matrix: | |
php-version: | |
- '8.2' | |
- '8.3' | |
- '8.4' | |
extension: | |
- 'cache-extra' | |
- 'cssinliner-extra' | |
- 'html-extra' | |
- 'inky-extra' | |
- 'intl-extra' | |
- 'markdown-extra' | |
- 'string-extra' | |
- 'twig-extra-bundle' | |
steps: | |
- name: "Checkout code" | |
uses: actions/checkout@v4 | |
- name: "Install PHP with extensions" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: "none" | |
php-version: ${{ matrix.php-version }} | |
ini-values: memory_limit=-1 | |
tools: phpunit:11.3 | |
- name: "Add PHPUnit matcher" | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: "Prevent installing symfony/translation-contract 3.0" | |
if: "matrix.extension == 'twig-extra-bundle'" | |
working-directory: extra/${{ matrix.extension }} | |
run: "composer require --no-update 'symfony/translation-contracts:^1.1|^2.0'" | |
- name: "Composer install ${{ matrix.extension }}" | |
working-directory: extra/${{ matrix.extension }} | |
run: composer install | |
- name: "Run tests for ${{ matrix.extension }}" | |
working-directory: extra/${{ matrix.extension }} | |
env: | |
LANG: 'en_US.UTF-8' | |
run: phpunit | |
integration-tests: | |
if: "false" # TODO re-enable that job when Drupal does not use features deprecated in 3.x anymore | |
needs: | |
- 'tests' | |
name: "Integration tests with PHP ${{ matrix.php-version }}" | |
runs-on: 'ubuntu-latest' | |
continue-on-error: true | |
strategy: | |
matrix: | |
php-version: | |
- '8.2' | |
steps: | |
- name: "Checkout code" | |
uses: actions/checkout@v4 | |
- name: "Install PHP with extensions" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: "none" | |
extensions: "gd, pdo_sqlite, uuid" | |
php-version: ${{ matrix.php-version }} | |
ini-values: memory_limit=-1 | |
tools: composer:v2 | |
- run: bash ./tests/drupal_test.sh | |
shell: "bash" |