-
-
Notifications
You must be signed in to change notification settings - Fork 3
101 lines (78 loc) · 2.42 KB
/
ci.yml
File metadata and controls
101 lines (78 loc) · 2.42 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: ci
on: ['pull_request', 'push']
jobs:
php-cs-fixer:
name: PHP CS Fixer (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: php-cs-fixer, cs2pr
- name: Run PHP CS Fixer
run: php-cs-fixer fix --format=checkstyle | cs2pr
psalm:
name: Psalm (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer
- name: Run Composer
run: composer update --no-interaction --no-progress
- name: Run Psalm
run: ./vendor/bin/psalm --output-format=github
tests:
name: tests
runs-on: ubuntu-latest
strategy:
matrix:
dependencies:
- lowest
- highest
php-version:
- '8.1'
- '8.2'
exclude:
- php-version: '8.1'
dependencies: lowest
steps:
- name: checkout
uses: actions/checkout@v3
- name: installing PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
ini-values: memory_limit=-1
tools: composer:v2
- name: caching dependencies
uses: actions/cache@v3
with:
path: |
~/.composer/cache
vendor
key: php-${{ matrix.php-version }}-${{ matrix.operating-system }}
restore-keys: php-${{ matrix.php-version }}-${{ matrix.operating-system }}
- name: installing lowest dependencies
if: ${{ matrix.dependencies == 'lowest' }}
run: composer update --prefer-lowest --no-interaction --no-progress
- name: installing highest dependencies
if: ${{ matrix.dependencies == 'highest' }}
run: composer update --no-interaction --no-progress
- name: installing PHPUnit
run: php vendor/bin/simple-phpunit install
- name: running tests
if: ${{ matrix.dependencies == 'lowest' }}
env:
SYMFONY_DEPRECATIONS_HELPER: disabled=1
run: php vendor/bin/simple-phpunit
- name: running tests
if: ${{ matrix.dependencies == 'highest' }}
run: php vendor/bin/simple-phpunit