v1.1.0 #156
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: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-24.04 | |
name: Linting | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up PHP Version | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
coverage: none | |
tools: composer:v2 | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.composer/cache | |
key: dependencies-composer-${{ runner.os }}-${{ hashFiles('composer.json') }} | |
- name: Add GITHUB_TOKEN if available | |
run: if [ -n "${{secrets.GITHUB_TOKEN}}" ]; then composer config github-oauth.github.com ${{secrets.GITHUB_TOKEN}}; fi; | |
- name: Install composer dependencies | |
run: | | |
rm -f composer.lock | |
composer require typo3/minimal:^12.4 | |
- name: phpstan | |
run: composer phpstan | |
- name: PHPCS | |
run: composer php:lint | |
- name: Typoscript Linter | |
run: composer ts:lint | |
build_doc: | |
runs-on: ubuntu-24.04 | |
name: Build documentation | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build doc | |
run: composer build:doc | |
tests: | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
env: | |
- { php: 8.4, TYPO3_VERSION: ^13.4 } | |
- { php: 8.3, TYPO3_VERSION: ^13.4 } | |
- { php: 8.2, TYPO3_VERSION: ^13.4 } | |
- { php: 8.4, TYPO3_VERSION: ^12.4 } | |
- { php: 8.3, TYPO3_VERSION: ^12.4 } | |
- { php: 8.2, TYPO3_VERSION: ^12.4 } | |
- { php: 8.1, TYPO3_VERSION: ^12.4 } | |
name: Tests on TYPO3 ${{ matrix.env.TYPO3_VERSION }} / PHP${{ matrix.env.php }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install ImageMagick | |
run: sudo apt-get update && sudo apt-get install -y imagemagick | |
- name: Set up PHP Version | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.env.php }} | |
extensions: pdo_sqlite | |
tools: composer:v2 | |
coverage: none | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.composer/cache | |
key: dependencies-composer-${{ runner.os }}-${{ hashFiles('composer.json') }} | |
- name: Add GITHUB_TOKEN if available | |
run: if [ -n "${{secrets.GITHUB_TOKEN}}" ]; then composer config github-oauth.github.com ${{secrets.GITHUB_TOKEN}}; fi; | |
- name: Install google-chrome if it is missing (e.g. when running locally with act) | |
if: env.ACT == 'true' | |
run: | | |
apt update && apt install -y wget sqlite3 && \ | |
wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" && \ | |
apt install -y ./google-chrome-stable_current_amd64.deb | |
- uses: nanasess/setup-chromedriver@v2 | |
- name: Install composer dependencies | |
run: | | |
rm -f composer.lock | |
composer require typo3/minimal:${{ matrix.env.TYPO3_VERSION }} | |
- name: Start builtin PHP webserver | |
run: | | |
export TYPO3_PATH_ROOT="$PWD/.Build/public" | |
export TYPO3_PATH_APP="$PWD/.Build" | |
php -S 127.0.0.1:8888 -t .Build/public/ &>/dev/null & | |
sleep 2 | |
- name: Start chromedriver | |
run: | | |
export DISPLAY=:99 | |
sudo Xvfb -ac :99 -screen 0 2560x1440x24 > /dev/null 2>&1 & | |
chromedriver --url-base=/wd/hub --port=9515 & | |
sleep 10 | |
- name: Unit tests (TYPO3 ${{ matrix.env.TYPO3_VERSION }} with PHP${{ matrix.env.php }}) | |
run: | | |
export TYPO3_PATH_ROOT=$PWD/.Build/public | |
export TYPO3_PATH_APP=$PWD/.Build | |
echo $TYPO3_PATH_APP | |
echo $TYPO3_PATH_ROOT | |
composer tests:unit | |
- name: Acceptance tests (TYPO3 ${{ matrix.env.TYPO3_VERSION }} with PHP${{ matrix.env.php }}) | |
env: | |
# TYPO3_PATH_ROOT: $GITHUB_WORKSPACE/.Build/public | |
typo3DatabaseDriver: pdo_sqlite | |
CHROME_OPTION_1: "--headless" | |
run: | | |
export TYPO3_PATH_ROOT="$PWD/.Build/public" | |
export TYPO3_PATH_APP="$PWD/.Build" | |
export typo3DatabaseDriver="pdo_sqlite" | |
composer tests:acceptance | |
- name: Upload Codeception output | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: codeception-results | |
path: Tests/Acceptance/_output/ | |
if-no-files-found: ignore | |
retention-days: 3 |