-
-
Notifications
You must be signed in to change notification settings - Fork 22
64 lines (58 loc) · 1.82 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
62
63
64
---
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@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
tools: cs2pr, composer
- run: composer --working-dir=tools/php-cs-fixer install
- run: tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --dry-run --format=checkstyle | cs2pr
phpstan:
runs-on: ubuntu-latest
name: phpstan
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
tools: cs2pr, composer
- run: composer update
- run: composer --working-dir=tools/phpstan install
- run: tools/phpstan/vendor/bin/phpstan --error-format=checkstyle | cs2pr
phpunit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.3, 8.2, 8.1, 8.0, 7.4]
stability: [prefer-lowest, prefer-stable]
name: PHPUnit on PHP ${{ matrix.php }}@${{ matrix.stability }}
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring
coverage: xdebug
- run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction # yamllint disable-line
- run: vendor/bin/phpunit
- uses: codecov/codecov-action@v4
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ibiqlik/action-yamllint@v3
with:
format: github