[BETA][FEATURE] Add TYPO3 v13 compatibility #778
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
--- | |
# This GitHub Actions workflow calculates the code coverage of the extension and uploads it to coveralls.io. | |
name: Code coverage | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
code-coverage: | |
name: "Calculate code coverage" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Install PHP" | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "${{ matrix.php-version }}" | |
tools: composer:v2.3 | |
extensions: xdebug, mysqli | |
coverage: xdebug | |
- name: "Show Composer version" | |
run: composer --version | |
- name: "Cache dependencies installed with composer" | |
uses: actions/cache@v4 | |
with: | |
key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-${{ hashFiles('**/composer.json') }}" | |
path: ~/.cache/composer | |
restore-keys: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-\n" | |
- name: "Install TYPO3 Core" | |
env: | |
TYPO3: "${{ matrix.typo3-version }}" | |
run: | | |
composer require --no-ansi --no-interaction --no-progress --no-install typo3/minimal:"$TYPO3" | |
composer show | |
- name: "Install lowest dependencies with composer" | |
if: "matrix.composer-dependencies == 'lowest'" | |
run: | | |
composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest | |
composer show | |
- name: "Install highest dependencies with composer" | |
if: "matrix.composer-dependencies == 'highest'" | |
run: | | |
composer update --no-ansi --no-interaction --no-progress --with-dependencies | |
composer show | |
- name: "Start MySQL" | |
run: "sudo /etc/init.d/mysql start" | |
- name: "Run unit tests with coverage" | |
run: composer ci:coverage:unit | |
- name: "Run functional tests with coverage" | |
run: | | |
export typo3DatabaseName="typo3"; | |
export typo3DatabaseHost="127.0.0.1"; | |
export typo3DatabaseUsername="root"; | |
export typo3DatabasePassword="root"; | |
composer ci:coverage:functional | |
- name: "Merge coverage results" | |
run: composer ci:coverage:merge | |
- name: "Upload coverage results to Coveralls" | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./.Build/vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- typo3-version: "^12" | |
php-version: "8.1" | |
composer-dependencies: highest |