8
8
release :
9
9
types : [created]
10
10
schedule :
11
- -
12
- cron : " 0 1 * * 6" # Run at 1am every Saturday
11
+ - cron : " 0 1 * * 6" # Run at 1am every Saturday
13
12
workflow_dispatch : ~
14
13
15
14
jobs :
16
15
tests :
17
16
runs-on : ubuntu-latest
18
-
17
+
19
18
name : " Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
20
-
19
+
21
20
strategy :
22
21
fail-fast : false
23
22
matrix :
24
- php : [8.0, 8.1, 8.2, 8.3]
25
- symfony : [^5.4, ^6.0 ]
26
- sylius : [~ 1.12.0, ~ 1.13.0 ]
27
- node : [18.x, 20.x]
28
- mysql : [5.7, 8.0]
29
-
23
+ php : [ " 8.0", " 8.1", " 8.2", " 8.3" ]
24
+ symfony : [ " ^5.4", " ^6.4" ]
25
+ sylius : [ "^ 1.12", "^ 1.13" ]
26
+ node : [ " 18.x", " 20.x" ]
27
+ mysql : [ " 8.0" ]
28
+
30
29
exclude :
31
- - sylius : " ~1.13.0"
32
- php : " 8.0"
30
+ - sylius : ^1.13
31
+ php : 8.0
32
+ - sylius : ^1.12
33
+ php : 8.0
34
+ symfony : ^6.4
33
35
34
36
env :
35
37
APP_ENV : test
@@ -84,25 +86,23 @@ jobs:
84
86
-
85
87
name : Get Composer cache directory
86
88
id : composer-cache
87
- run : echo "dir= $(composer config cache-files-dir)" >> "$GITHUB_OUTPUT "
89
+ run : echo "::set-output name=dir:: $(composer config cache-files-dir)"
88
90
89
91
-
90
92
name : Cache Composer
91
- uses : actions/cache@v2
93
+ uses : actions/cache@v4
92
94
with :
93
95
path : ${{ steps.composer-cache.outputs.dir }}
94
96
key : ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
95
97
restore-keys : |
96
98
${{ runner.os }}-php-${{ matrix.php }}-composer-
97
-
98
99
-
99
100
name : Restrict Symfony version
100
101
if : matrix.symfony != ''
101
102
run : |
102
103
composer global config --no-plugins allow-plugins.symfony/flex true
103
104
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10"
104
105
composer config extra.symfony.require "${{ matrix.symfony }}"
105
-
106
106
-
107
107
name : Restrict Sylius version
108
108
if : matrix.sylius != ''
@@ -111,21 +111,22 @@ jobs:
111
111
-
112
112
name : Install PHP dependencies
113
113
run : composer install --no-interaction
114
+ env :
115
+ SYMFONY_REQUIRE : ${{ matrix.symfony }}
114
116
115
117
-
116
118
name : Get Yarn cache directory
117
119
id : yarn-cache
118
- run : echo "dir= $(yarn cache dir)" >> "$GITHUB_OUTPUT "
120
+ run : echo "::set-output name=dir:: $(yarn cache dir)"
119
121
120
122
-
121
123
name : Cache Yarn
122
- uses : actions/cache@v2
124
+ uses : actions/cache@v4
123
125
with :
124
126
path : ${{ steps.yarn-cache.outputs.dir }}
125
127
key : ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
126
128
restore-keys : |
127
129
${{ runner.os }}-node-${{ matrix.node }}-yarn-
128
-
129
130
-
130
131
name : Install JS dependencies
131
132
run : (cd tests/Application && yarn install)
@@ -135,13 +136,11 @@ jobs:
135
136
run : |
136
137
(cd tests/Application && bin/console doctrine:database:create -vvv)
137
138
(cd tests/Application && bin/console doctrine:schema:create -vvv)
138
-
139
139
-
140
140
name : Prepare test application assets
141
141
run : |
142
142
(cd tests/Application && bin/console assets:install public -vvv)
143
143
(cd tests/Application && yarn encore dev)
144
-
145
144
-
146
145
name : Prepare test application cache
147
146
run : (cd tests/Application && bin/console cache:warmup -vvv)
@@ -158,30 +157,25 @@ jobs:
158
157
name : Validate database schema
159
158
run : (cd tests/Application && bin/console doctrine:schema:validate)
160
159
161
- -
162
- name : Run PHPStan
163
- run : vendor/bin/phpstan analyse -c phpstan.neon -l 8 src/
164
-
165
- # TODO: Temporary disabled!
166
- # -
167
- # name: Run Psalm
168
- # run: vendor/bin/psalm
169
-
170
160
-
171
161
name : Run PHPSpec
172
162
run : vendor/bin/phpspec run --ansi -f progress --no-interaction
173
163
174
- # -
175
- # name: Run PHPUnit
176
- # run: vendor/bin/phpunit --colors=always
164
+ -
165
+ name : Run PHPUnit
166
+ run : vendor/bin/phpunit --colors=always
167
+
168
+ -
169
+ name : Create behat logs directory
170
+ run : (mkdir -p etc/build && chmod a+rw etc/build )
177
171
178
172
-
179
173
name : Run Behat
180
174
run : vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun
181
175
182
176
-
183
177
name : Upload Behat logs
184
- uses : actions/upload-artifact@v2
178
+ uses : actions/upload-artifact@v3
185
179
if : failure()
186
180
with :
187
181
name : Behat logs
0 commit comments