-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 2.34 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
name: CI
on:
schedule: [ { cron: '30 5 * * 1,5' } ]
pull_request:
push:
branches: [ "[0-9]+.[0-9]+" ]
paths-ignore: [ "README.md", "CHANGELOG.md", "doc/**/*" ]
jobs:
analysis:
name: Analysis
permissions:
actions: read
contents: read
checks: write
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
- uses: ramsey/composer-install@v2
- run: mkdir -p report/psalm report/phpcs
if: success() || failure()
- run: composer exec -- psalm --long-progress --output-format=github --report=report/psalm/checkstyle.xml --report-show-info=false
if: success() || failure()
- run: composer exec -- phpcs --colors --report=checkstyle --report-checkstyle=report/phpcs/checkstyle.xml
if: success() || failure()
- uses: jwgmeligmeyling/checkstyle-github-action@master
if: success() || failure()
with:
name: Psalm
path: report/psalm/checkstyle.xml
- uses: jwgmeligmeyling/checkstyle-github-action@master
if: success() || failure()
with:
name: PHP_CodeSniffer
path: report/phpcs/checkstyle.xml
test:
name: Tests
needs: analysis
runs-on: [ubuntu-latest]
continue-on-error: ${{ matrix.dependency-versions == 'lowest' }}
strategy:
matrix:
php: [ "8.1", "8.2", "8.3" ]
dependency-versions: [ lowest, highest ]
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
- uses: ramsey/composer-install@v2
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "${{ matrix.composer-options }}"
- run: mkdir -p report/phpunit
if: success() || failure()
- run: composer exec -- phpunit --testsuite tests --colors=always
if: success() || failure()