mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-22 20:36:12 +01:00
[TASK] Use a matrix for the configuring the code quality checks (#65)
This reduces code duplication in the CI configuration file. Fixes #63
This commit is contained in:
parent
6671dce5b3
commit
95a0d58416
1 changed files with 7 additions and 37 deletions
44
.github/workflows/ci.yml
vendored
44
.github/workflows/ci.yml
vendored
|
@ -29,13 +29,16 @@ jobs:
|
||||||
- name: Run PHP lint
|
- name: Run PHP lint
|
||||||
run: composer ci:php:lint
|
run: composer ci:php:lint
|
||||||
|
|
||||||
typoscript-lint:
|
code-quality:
|
||||||
name: TypoScript linter
|
name: Code quality checks
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
command:
|
||||||
|
- ts:lint
|
||||||
|
- php:sniff
|
||||||
php-version:
|
php-version:
|
||||||
- 7.3
|
- 7.3
|
||||||
|
|
||||||
|
@ -59,41 +62,8 @@ jobs:
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress
|
run: composer install --no-progress
|
||||||
|
|
||||||
- name: Run TypoScript lint
|
- name: Run command
|
||||||
run: composer ci:ts:lint
|
run: composer ci:${{ matrix.command }}
|
||||||
|
|
||||||
php-code-sniffer:
|
|
||||||
name: PHP Code Sniffer
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
php-version:
|
|
||||||
- 7.3
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: Install PHP
|
|
||||||
uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php-version }}
|
|
||||||
|
|
||||||
- name: "Cache dependencies installed with composer"
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.composer/cache
|
|
||||||
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
php${{ matrix.php-version }}-composer-
|
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
|
||||||
run: composer install --no-progress
|
|
||||||
|
|
||||||
- name: Run PHP Code Sniffer
|
|
||||||
run: composer ci:php:sniff
|
|
||||||
|
|
||||||
unit-tests:
|
unit-tests:
|
||||||
name: Unit tests
|
name: Unit tests
|
||||||
|
|
Loading…
Reference in a new issue