Skip to content

Commit d4f5f79

Browse files
authored
Merge pull request #13 from TYPO3-Headless/feature/add_github_action
Add Github actions vor PHP 8.0 Linting.
2 parents e38ea84 + 116b529 commit d4f5f79

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/ci.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: CI
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
schedule:
10+
- cron: '15 3 * * 1'
11+
jobs:
12+
php-lint:
13+
name: "PHP linter"
14+
runs-on: ubuntu-20.04
15+
steps:
16+
- name: "Checkout"
17+
uses: actions/checkout@v2
18+
- name: "Install PHP"
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: "${{ matrix.php-version }}"
22+
coverage: none
23+
tools: composer:v2
24+
- name: "Run PHP lint"
25+
run: "composer ci:php:lint"
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
php-version:
30+
- 8.0

composer.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,26 @@
1010
"friendsoftypo3/headless": "^3.0"
1111
},
1212
"require-dev": {
13-
"roave/security-advisories": "dev-latest"
13+
"roave/security-advisories": "dev-latest",
14+
"friendsofphp/php-cs-fixer": "^3.1"
1415
},
1516
"extra": {
1617
"typo3/cms": {
1718
"extension-key": "headless_container_support"
1819
}
1920
},
21+
"scripts": {
22+
"ci:php:lint": "find *.php Classes Configuration -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l"
23+
},
2024
"autoload": {
2125
"psr-4": {
2226
"Fanor51\\HeadlesContainerSupport\\": "Classes/"
2327
}
28+
},
29+
"config": {
30+
"allow-plugins": {
31+
"typo3/cms-composer-installers": true,
32+
"typo3/class-alias-loader": true
33+
}
2434
}
2535
}

0 commit comments

Comments
 (0)