[TASK] Prepare release 1.8.0 #215
Workflow file for this run
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 | |
pull_request: | |
jobs: | |
lint: | |
name: Source code linting | |
runs-on: ubuntu-latest | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: Validate composer.json | |
run: composer validate | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- | |
name: Cache composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: composer- | |
- | |
name: Install composer dependencies | |
run: composer install --prefer-dist --no-progress | |
- | |
name: PHP Linting | |
run: composer lint:php | |
- | |
name: Editorconfig Linting | |
run: composer lint:editorconfig | |
- | |
name: Phpstan Linting | |
run: composer lint:phpstan | |
test-unit: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 2 | |
matrix: | |
php-versions: [8.2, 8.1] | |
typo3-versions: [11, 12] | |
name: Unit Testing (PHP ${{ matrix.php-versions }}, TYPO3 ${{ matrix.typo3-versions }}) | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: intl, mbstring, pdo_sqlite | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- | |
name: Cache composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: composer-php-${{ matrix.php-versions }}-typo3-${{ matrix.typo3-versions }} | |
restore-keys: | | |
composer-php-${{ matrix.php-versions }}- | |
composer- | |
- | |
name: Install composer dependencies | |
run: composer require typo3/minimal "^${{ matrix.typo3-versions }}" --prefer-dist --no-progress | |
- | |
name: Unit Testing | |
run: composer coverage:unit | |
- | |
name: Upload coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-unit-${{ matrix.php-versions }}-${{ matrix.typo3-versions }} | |
path: .Build/logs/clover.unit.xml | |
test-functional: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 2 | |
matrix: | |
php-versions: [8.2, 8.1] | |
typo3-versions: [11, 12] | |
name: Functional Testing (PHP ${{ matrix.php-versions }}, TYPO3 ${{ matrix.typo3-versions }}) | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: intl, mbstring, pdo_sqlite | |
# - | |
# name: Setup GraphicsMagick | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y graphicsmagick | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- | |
name: Cache composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: composer-php-${{ matrix.php-versions }}-typo3-${{ matrix.typo3-versions }} | |
restore-keys: | | |
composer-php-${{ matrix.php-versions }}- | |
composer- | |
- | |
name: Install composer dependencies | |
run: composer require typo3/minimal "^${{ matrix.typo3-versions }}" --prefer-dist --no-progress | |
- | |
name: Functional testing | |
run: typo3DatabaseDriver=pdo_sqlite composer coverage:functional | |
- | |
name: Upload coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-functional-${{ matrix.php-versions }}-${{ matrix.typo3-versions }} | |
path: .Build/logs/clover.functional.xml | |
coverage: | |
needs: | |
- test-unit | |
- test-functional | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: Download unit test coverage reports | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-unit-8.2-12 | |
- | |
name: Download functional test coverage reports | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-functional-8.2-12 | |
- | |
name: Upload coverage results to Coveralls | |
uses: paambaati/codeclimate-action@v5.0.0 | |
env: | |
CC_TEST_REPORTER_ID: 32807026fddd031a98d1371e6a9360c6bd30f7be0d4bb9a5516a93cd748d9b34 | |
with: | |
coverageLocations: | | |
clover.unit.xml:clover | |
clover.functional.xml:clover |