Skip to content

Commit a2649c8

Browse files
Add CI
1 parent 157ccd5 commit a2649c8

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/test.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
check-composer:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Install PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: "8.1"
18+
coverage: none
19+
tools: composer:v2
20+
env:
21+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Validate composer.json
24+
run: composer validate
25+
26+
php-linting:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
32+
- name: Install PHP
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: "8.1"
36+
coverage: none
37+
38+
- name: PHP lint
39+
run: "find *.php src/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l"
40+
41+
coding-guideline:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v3
45+
46+
- name: Install PHP
47+
uses: shivammathur/setup-php@v2
48+
with:
49+
php-version: "8.1"
50+
coverage: none
51+
tools: composer:v2
52+
env:
53+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
55+
- name: Install dependencies
56+
run: composer install --no-progress
57+
58+
- name: Coding Guideline
59+
run: PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --dry-run --diff
60+
61+
code-quality:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v3
65+
66+
- name: Install PHP
67+
uses: shivammathur/setup-php@v2
68+
with:
69+
php-version: "8.1"
70+
coverage: none
71+
tools: composer:v2
72+
env:
73+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
75+
- name: Install dependencies with expected TYPO3 version
76+
run: composer install --no-progress
77+
78+
- name: Code Quality (by PHPStan)
79+
run: ./vendor/bin/phpstan analyse

0 commit comments

Comments
 (0)