-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (56 loc) · 1.67 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
name: Continuous Integration
on: [push, pull_request]
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
env:
PHP_CS_FIXER_IGNORE_ENV: true
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
tools: composer, cs2pr
- run: composer --working-dir=tools/php-cs-fixer install
- uses: actions/cache@v3
with:
path: .php-cs-fixer.cache
key: php-cs-fixer
- if: ${{ github.event_name == 'push' }}
run: tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --dry-run --format=checkstyle | cs2pr
- if: ${{ github.event_name == 'pull_request' }}
run: >
tools/php-cs-fixer/vendor/bin/php-cs-fixer fix
--diff
--dry-run
--format=checkstyle
--path-mode=intersection
$(git diff --name-only --diff-filter=ACMRTUXB "${COMMIT_RANGE}")
| cs2pr
phpstan:
runs-on: ubuntu-latest
name: phpstan
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
tools: composer, cs2pr
- run: composer install
- uses: actions/cache@v3
with:
path: |
resultCache.php
cache
key: phpstan-${{ hashFiles('tools/phpstan/composer.*', 'phpstan.neon.dist', 'phpstan-baseline.neon') }}
- run: vendor/bin/phpstan --error-format=checkstyle | cs2pr
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ibiqlik/action-yamllint@v3
with:
format: github