mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-26 12:56:13 +01:00

[TASK] Sync the GitHub Actions job definitions (#424)

Having a consistent structure and order between the CI jobs and the
code coverage generation job makes understanding the GitHub Actions
configuration easier.

It also allows having a shared Composer cache between the non-coverage
jobs and the coverage job.
This commit is contained in:
Oliver Klee 2022-04-15 14:35:33 +02:00 committed by GitHub
parent 65c59cee1c
commit 0a634def2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,22 +16,32 @@ jobs:
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: "${{ matrix.php-version }}" php-version: "${{ matrix.php-version }}"
coverage: xdebug
extensions: xdebug, mysqli
tools: composer:v2.3 tools: composer:v2.3
extensions: xdebug, mysqli
coverage: xdebug
- name: "Show Composer version" - name: "Show Composer version"
run: composer --version run: composer --version
- name: "Cache dependencies installed with composer" - name: "Cache dependencies installed with composer"
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-composer-${{ hashFiles('**/composer.json') }}" key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-composer-\n" restore-keys: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-\n"
- name: "Install TYPO3 Core" - name: "Install TYPO3 Core"
env: env:
TYPO3: "${{ matrix.typo3-version }}" TYPO3: "${{ matrix.typo3-version }}"
run: | run: |
composer require --no-progress typo3/minimal:"$TYPO3" 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 composer show
- name: "Start MySQL" - name: "Start MySQL"
run: "sudo /etc/init.d/mysql start" run: "sudo /etc/init.d/mysql start"
@ -61,7 +71,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-version: include:
- 7.4 - typo3-version: ^10.4
typo3-version: php-version: 7.4
- ^10.4 composer-dependencies: highest