[TASK] Update typo3fluid/fluid to v4 (0.8.x) #1296
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
- 0.8.x | |
pull_request: | |
branches: | |
- main | |
- 0.8.x | |
jobs: | |
tests: | |
name: Tests (PHP ${{ matrix.php-version }}, TYPO3 ${{ matrix.typo3-version }} & ${{ matrix.dependencies }} dependencies) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
typo3-version: ["12.4"] | |
php-version: ["8.1", "8.2", "8.3"] | |
dependencies: ["highest", "lowest"] | |
env: | |
typo3DatabaseName: typo3 | |
typo3DatabaseHost: '127.0.0.1' | |
typo3DatabaseUsername: root | |
typo3DatabasePassword: root | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Prepare environment | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: composer:v2 | |
coverage: none | |
# Start MySQL service | |
- name: Start MySQL | |
run: sudo /etc/init.d/mysql start | |
# Install dependencies | |
- name: Install Composer dependencies | |
uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
composer-options: --with=typo3/cms-core:"~${{ matrix.typo3-version }}.0" | |
# Run tests | |
- name: Run tests | |
run: composer test | |
coverage: | |
name: Test coverage | |
runs-on: ubuntu-latest | |
env: | |
typo3DatabaseName: typo3 | |
typo3DatabaseHost: '127.0.0.1' | |
typo3DatabaseUsername: root | |
typo3DatabasePassword: root | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Prepare environment | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
tools: composer:v2 | |
coverage: pcov | |
# Start MySQL service | |
- name: Start MySQL | |
run: sudo /etc/init.d/mysql start | |
# Install dependencies | |
- name: Install Composer dependencies | |
uses: ramsey/composer-install@v2 | |
# Run tests | |
- name: Run tests | |
run: composer test:coverage | |
# Upload artifact | |
- name: Fix coverage path | |
working-directory: .Build/coverage | |
run: sed -i 's#/home/runner/work/handlebars/handlebars#${{ github.workspace }}#g' clover.xml | |
- name: Upload coverage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: .Build/coverage/clover.xml | |
retention-days: 7 | |
coverage-report: | |
name: Report test coverage | |
runs-on: ubuntu-latest | |
needs: coverage | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Download artifact | |
- name: Download coverage artifact | |
id: download | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage | |
# CodeClimate | |
- name: CodeClimate report | |
uses: paambaati/codeclimate-action@v9.0.0 | |
if: env.CC_TEST_REPORTER_ID | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
with: | |
coverageLocations: | | |
${{ steps.download.outputs.download-path }}/clover.xml:clover | |
# Coveralls | |
- name: Coveralls report | |
uses: coverallsapp/github-action@v2 | |
with: | |
file: ${{ steps.download.outputs.download-path }}/clover.xml |