Skip to content

Implement YieldingTemplate::display*Block() #1282

Implement YieldingTemplate::display*Block()

Implement YieldingTemplate::display*Block() #1282

Workflow file for this run

name: "CI"
on:
pull_request:
push:
branches:
- '3.x'
env:
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1
permissions:
contents: read
jobs:
tests:
name: "PHP ${{ matrix.php-version }} (yield: ${{ matrix.use_yield }})"
runs-on: 'ubuntu-latest'
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
php-version:
- '7.2.5'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
experimental: [false]
use_yield: [true, false]
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
- name: "Add PHPUnit matcher"
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- run: composer install
- name: "Switch use_yield to true"
if: ${{ matrix.use_yield }}
run: |
sed -i -e "s/'use_yield' => false/'use_yield' => true/" src/Environment.php
- name: "Install PHPUnit"
run: vendor/bin/simple-phpunit install
- name: "PHPUnit version"
run: vendor/bin/simple-phpunit --version
- name: "Run tests"
run: SYMFONY_DEPRECATIONS_HELPER=ignoreFile=./tests/ignore-use-yield-deprecations vendor/bin/simple-phpunit
extension-tests:
needs:
- 'tests'
name: "${{ matrix.extension }} PHP ${{ matrix.php-version }} (yield: ${{ matrix.use_yield }})"
runs-on: 'ubuntu-latest'
continue-on-error: true
strategy:
matrix:
php-version:
- '7.2.5'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
extension:
- 'cache-extra'
- 'cssinliner-extra'
- 'html-extra'
- 'inky-extra'
- 'intl-extra'
- 'markdown-extra'
- 'string-extra'
- 'twig-extra-bundle'
experimental: [false]
use_yield: [true, false]
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
- name: "Add PHPUnit matcher"
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: "Composer install Twig"
run: composer install
- name: "Install PHPUnit"
run: vendor/bin/simple-phpunit install
- name: "PHPUnit version"
run: vendor/bin/simple-phpunit --version
- name: "Composer install ${{ matrix.extension}}"
working-directory: extra/${{ matrix.extension}}
run: composer install
- name: "Switch use_yield to true"
if: ${{ matrix.use_yield }}
run: |
sed -i -e "s/'use_yield' => false/'use_yield' => true/" extra/${{ matrix.extension }}/vendor/twig/twig/src/Environment.php
- name: "Run tests for ${{ matrix.extension}}"
working-directory: extra/${{ matrix.extension }}
run: SYMFONY_DEPRECATIONS_HELPER=ignoreFile=../../tests/ignore-use-yield-deprecations ../../vendor/bin/simple-phpunit
integration-tests:
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"