|
1 | | -name: "CI Tests" |
| 1 | +name: Build |
2 | 2 |
|
3 | 3 | on: |
4 | | - pull_request: |
5 | | - push: |
| 4 | + pull_request: ~ |
| 5 | + push: ~ |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - |
9 | | - php-74-symfony54: |
10 | | - name: PHP 7.4 / Symfony 5.4 |
11 | | - runs-on: ubuntu-latest |
| 8 | + phpstan: |
| 9 | + runs-on: ubuntu-20.04 |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + php: |
| 13 | + - '7.4' |
| 14 | + - '8.2' |
| 15 | + include: |
| 16 | + - description: 'Symfony 5.4' |
| 17 | + php: '7.4' |
| 18 | + symfony: 5.4.* |
| 19 | + - description: 'Symfony 6.2' |
| 20 | + php: '8.2' |
| 21 | + symfony: 6.2.* |
| 22 | + name: PHPStan - PHP ${{ matrix.php }} tests (${{ matrix.description }}) |
12 | 23 | steps: |
13 | | - - name: "Checkout" |
14 | | - uses: "actions/checkout@v3" |
15 | | - with: |
16 | | - fetch-depth: 2 |
17 | | - |
18 | | - - name: "Install PHP 7.4" |
19 | | - uses: "shivammathur/setup-php@v2" |
20 | | - with: |
21 | | - php-version: "7.4" |
22 | | - |
23 | | - - name: "Cache composer packages" |
24 | | - uses: "actions/cache@v3" |
25 | | - with: |
26 | | - path: "~/.composer/cache" |
27 | | - key: "php-7.4-composer-locked-${{ hashFiles('composer.lock') }}" |
28 | | - restore-keys: "php-7.4-composer-locked-" |
29 | | - |
30 | | - - name: "Install Symfony 5.4" |
31 | | - run: "composer require symfony/symfony:5.4.* --no-update" |
32 | | - |
33 | | - - name: "Install dependencies with composer" |
34 | | - run: "composer update --no-interaction" |
35 | | - |
36 | | - - name: "Run PHPUnit Tests" |
37 | | - run: "composer test" |
38 | | - |
39 | | - php-80-symfony54: |
40 | | - name: PHP 8.0 / Symfony 5.4 |
41 | | - runs-on: ubuntu-latest |
| 24 | + - name: Checkout |
| 25 | + uses: actions/checkout@v3 |
| 26 | + |
| 27 | + - name: Setup PHP |
| 28 | + uses: shivammathur/setup-php@v2 |
| 29 | + with: |
| 30 | + coverage: "none" |
| 31 | + php-version: ${{ matrix.php }} |
| 32 | + - run: | |
| 33 | + sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' composer.json; |
| 34 | + - run: composer update --no-interaction --no-progress --ansi ${{ matrix.composer_option }} |
| 35 | + - run: vendor/bin/phpstan analyse -c phpstan.neon.dist --error-format=github |
| 36 | + |
| 37 | + cs-fixer: |
| 38 | + runs-on: ubuntu-20.04 |
| 39 | + name: PHP-CS-Fixer |
42 | 40 | steps: |
43 | | - - name: "Checkout" |
44 | | - uses: "actions/checkout@v3" |
45 | | - with: |
46 | | - fetch-depth: 2 |
47 | | - |
48 | | - - name: "Install PHP 8" |
49 | | - uses: "shivammathur/setup-php@v2" |
50 | | - with: |
51 | | - php-version: "8.0" |
52 | | - |
53 | | - - name: "Cache composer packages" |
54 | | - uses: "actions/cache@v3" |
55 | | - with: |
56 | | - path: "~/.composer/cache" |
57 | | - key: "php-8.0-composer-locked-${{ hashFiles('composer.lock') }}" |
58 | | - restore-keys: "php-8.0-composer-locked-" |
59 | | - |
60 | | - - name: "Install Symfony 5.4" |
61 | | - run: "composer require symfony/symfony:5.4.* --no-update" |
62 | | - |
63 | | - - name: "Install dependencies with composer" |
64 | | - run: "composer update --no-interaction" |
65 | | - |
66 | | - - name: "Run PHPUnit Tests" |
67 | | - run: "composer test" |
68 | | - |
69 | | - php-81-symfony54: |
70 | | - name: PHP 8.1 / Symfony 5.4 |
71 | | - runs-on: ubuntu-latest |
72 | | - steps: |
73 | | - - name: "Checkout" |
74 | | - uses: "actions/checkout@v3" |
75 | | - with: |
76 | | - fetch-depth: 2 |
77 | | - |
78 | | - - name: "Install PHP 8.1" |
79 | | - uses: "shivammathur/setup-php@v2" |
80 | | - with: |
81 | | - php-version: "8.1" |
82 | | - |
83 | | - - name: "Cache composer packages" |
84 | | - uses: "actions/cache@v3" |
85 | | - with: |
86 | | - path: "~/.composer/cache" |
87 | | - key: "php-8.1-composer-locked-${{ hashFiles('composer.lock') }}" |
88 | | - restore-keys: "php-8.1-composer-locked-" |
89 | | - |
90 | | - - name: "Install Symfony 5.4" |
91 | | - run: "composer require symfony/symfony:5.4.* --no-update" |
92 | | - |
93 | | - - name: "Install dependencies with composer" |
94 | | - run: "composer update --no-interaction" |
95 | | - |
96 | | - - name: "Run PHPUnit Tests" |
97 | | - run: "composer test" |
98 | | - |
99 | | - php-82-symfony54: |
100 | | - name: PHP 8.2 / Symfony 5.4 |
101 | | - runs-on: ubuntu-latest |
| 41 | + - name: Checkout |
| 42 | + uses: actions/checkout@v3 |
| 43 | + - name: Fix CS |
| 44 | + uses: docker://oskarstark/php-cs-fixer-ga |
| 45 | + tests: |
| 46 | + runs-on: ubuntu-20.04 |
| 47 | + strategy: |
| 48 | + matrix: |
| 49 | + php: |
| 50 | + - '7.4' |
| 51 | + - '8.0' |
| 52 | + - '8.1' |
| 53 | + - '8.2' |
| 54 | + include: |
| 55 | + - description: 'Symfony 5.4' |
| 56 | + php: '7.4' |
| 57 | + symfony: 5.4.* |
| 58 | + composer_option: '--prefer-lowest' |
| 59 | + - description: 'Symfony 6.0' |
| 60 | + php: '8.0' |
| 61 | + symfony: 6.0.* |
| 62 | + - description: 'Symfony 6.1' |
| 63 | + php: '8.1' |
| 64 | + symfony: 6.1.* |
| 65 | + - description: 'Symfony 6.2' |
| 66 | + php: '8.2' |
| 67 | + symfony: 6.2.* |
| 68 | + - description: 'Symfony 6.3' |
| 69 | + php: '8.2' |
| 70 | + symfony: 6.3.*-dev |
| 71 | + name: PHP ${{ matrix.php }} tests (${{ matrix.description }}) |
102 | 72 | steps: |
103 | | - - name: "Checkout" |
104 | | - uses: "actions/checkout@v3" |
105 | | - with: |
106 | | - fetch-depth: 2 |
107 | | - |
108 | | - - name: "Install PHP 8.2" |
109 | | - uses: "shivammathur/setup-php@v2" |
110 | | - with: |
111 | | - php-version: "8.2" |
112 | | - |
113 | | - - name: "Cache composer packages" |
114 | | - uses: "actions/cache@v3" |
115 | | - with: |
116 | | - path: "~/.composer/cache" |
117 | | - key: "php-8.2-composer-locked-${{ hashFiles('composer.lock') }}" |
118 | | - restore-keys: "php-8.2-composer-locked-" |
119 | | - |
120 | | - - name: "Install Symfony 5.4" |
121 | | - run: "composer require symfony/symfony:5.4.* --no-update" |
122 | | - |
123 | | - - name: "Install dependencies with composer" |
124 | | - run: "composer update --no-interaction" |
125 | | - |
126 | | - - name: "Run PHPUnit Tests" |
127 | | - run: "composer test" |
128 | | - |
129 | | - php-81-symfony62: |
130 | | - name: PHP 8.1 / Symfony 6.2 |
131 | | - runs-on: ubuntu-latest |
132 | | - steps: |
133 | | - - name: "Checkout" |
134 | | - uses: "actions/checkout@v3" |
135 | | - with: |
136 | | - fetch-depth: 2 |
137 | | - |
138 | | - - name: "Install PHP 8.1" |
139 | | - uses: "shivammathur/setup-php@v2" |
140 | | - with: |
141 | | - php-version: "8.1" |
142 | | - |
143 | | - - name: "Cache composer packages" |
144 | | - uses: "actions/cache@v3" |
145 | | - with: |
146 | | - path: "~/.composer/cache" |
147 | | - key: "php-8.1-symfony-6.2-composer-locked-${{ hashFiles('composer.lock') }}" |
148 | | - restore-keys: "php-8.1-symfony-6.2-composer-locked-" |
149 | | - |
150 | | - - name: "Install Symfony 6.2" |
151 | | - run: "composer require symfony/symfony:6.2.* --no-update" |
152 | | - |
153 | | - - name: "Install dependencies with composer" |
154 | | - run: "composer update --no-interaction" |
155 | | - |
156 | | - - name: "Run PHPUnit Tests" |
157 | | - run: "composer test" |
158 | | - |
159 | | - php-82-symfony62: |
160 | | - name: PHP 8.2 / Symfony 6.2 |
161 | | - runs-on: ubuntu-latest |
162 | | - steps: |
163 | | - - name: "Checkout" |
164 | | - uses: "actions/checkout@v3" |
165 | | - with: |
166 | | - fetch-depth: 2 |
167 | | - |
168 | | - - name: "Install PHP 8.2" |
169 | | - uses: "shivammathur/setup-php@v2" |
170 | | - with: |
171 | | - php-version: "8.2" |
172 | | - |
173 | | - - name: "Cache composer packages" |
174 | | - uses: "actions/cache@v3" |
175 | | - with: |
176 | | - path: "~/.composer/cache" |
177 | | - key: "php-8.1-symfony-6.2-composer-locked-${{ hashFiles('composer.lock') }}" |
178 | | - restore-keys: "php-8.1-symfony-6.2-composer-locked-" |
179 | | - |
180 | | - - name: "Install Symfony 6.2" |
181 | | - run: "composer require symfony/symfony:6.2.* --no-update" |
182 | | - |
183 | | - - name: "Install dependencies with composer" |
184 | | - run: "composer update --no-interaction" |
185 | | - |
186 | | - - name: "Run PHPUnit Tests" |
187 | | - run: "composer test" |
| 73 | + - name: Checkout |
| 74 | + uses: actions/checkout@v3 |
| 75 | + - name: Cache |
| 76 | + uses: actions/cache@v3 |
| 77 | + with: |
| 78 | + path: ~/.composer/cache/files |
| 79 | + key: ${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.composer_option }} |
| 80 | + - name: Setup PHP |
| 81 | + uses: shivammathur/setup-php@v2 |
| 82 | + with: |
| 83 | + php-version: ${{ matrix.php }} |
| 84 | + - run: | |
| 85 | + sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' composer.json; |
| 86 | + if: contains(matrix.symfony, '-dev') |
| 87 | + - run: composer config minimum-stability dev |
| 88 | + - run: composer config prefer-stable true |
| 89 | + if: matrix.symfony |
| 90 | + - run: composer update --no-interaction --no-progress --ansi ${{ matrix.composer_option }} |
| 91 | + - run: composer test |
0 commit comments