17
17
18
18
jobs :
19
19
tests :
20
- runs-on : ubuntu-18.04
20
+ runs-on : ubuntu-latest
21
21
22
- name : " PHP ${{ matrix.php }}, MySQL ${{ matrix.mysql }}"
22
+ name : " PHP ${{ matrix.php }}, MySQL ${{ matrix.mysql }}, Sylius ${{ matrix.sylius }} "
23
23
24
24
strategy :
25
25
fail-fast : false
26
26
matrix :
27
- php : [7.4, 7 .3]
27
+ php : [8.1, 8.2, 8 .3]
28
28
node : [10.x]
29
29
mysql : [5.7, 8.0]
30
-
31
- exclude :
32
- - # PHP 7.3 does not support "caching_sha2_password" authentication plugin which is a default one in MySQL 8.0
33
- php : 7.3
34
- mysql : 8.0
30
+ sylius : [1.13.*, 1.14.*]
35
31
36
32
env :
37
33
APP_ENV : test
38
34
DATABASE_URL :
" mysql://root:[email protected] /sylius?serverVersion=${{ matrix.mysql }}"
39
35
40
36
steps :
41
37
-
42
- uses : actions/checkout@v2
38
+ uses : actions/checkout@v4
43
39
44
40
-
45
41
name : Setup PHP
52
48
53
49
-
54
50
name : Setup Node
55
- uses : actions/setup-node@v1
51
+ uses : actions/setup-node@v4
56
52
with :
57
53
node-version : " ${{ matrix.node }}"
58
54
@@ -79,24 +75,24 @@ jobs:
79
75
name : Run Chrome Headless
80
76
run : google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
81
77
82
- -
83
- name : Run webserver
84
- run : (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
85
-
86
78
-
87
79
name : Get Composer cache directory
88
80
id : composer-cache
89
81
run : echo "::set-output name=dir::$(composer config cache-files-dir)"
90
82
91
83
-
92
84
name : Cache Composer
93
- uses : actions/cache@v2
85
+ uses : actions/cache@v4
94
86
with :
95
87
path : ${{ steps.composer-cache.outputs.dir }}
96
88
key : ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
97
89
restore-keys : |
98
90
${{ runner.os }}-php-${{ matrix.php }}-composer-
99
91
92
+ -
93
+ name : Require Sylius version
94
+ run : composer require sylius/sylius:"${{ matrix.sylius }}" --no-update
95
+
100
96
-
101
97
name : Install PHP dependencies
102
98
run : composer install --no-interaction
@@ -108,57 +104,21 @@ jobs:
108
104
109
105
-
110
106
name : Cache Yarn
111
- uses : actions/cache@v2
107
+ uses : actions/cache@v4
112
108
with :
113
109
path : ${{ steps.yarn-cache.outputs.dir }}
114
110
key : ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
115
111
restore-keys : |
116
112
${{ runner.os }}-node-${{ matrix.node }}-yarn-
117
113
118
- -
119
- name : Install JS dependencies
120
- run : (cd tests/Application && yarn install)
121
-
122
- -
123
- name : Prepare test application database
124
- run : |
125
- (cd tests/Application && bin/console doctrine:database:create -vvv)
126
- (cd tests/Application && bin/console doctrine:schema:create -vvv)
127
-
128
- -
129
- name : Prepare test application assets
130
- run : |
131
- (cd tests/Application && bin/console assets:install public -vvv)
132
- (cd tests/Application && yarn build)
133
-
134
- -
135
- name : Prepare test application cache
136
- run : (cd tests/Application && bin/console cache:warmup -vvv)
137
-
138
- -
139
- name : Load fixtures in test application
140
- run : (cd tests/Application && bin/console sylius:fixtures:load -n)
141
-
142
114
-
143
115
name : Validate composer.json
144
116
run : composer validate --ansi --strict
145
117
146
118
-
147
- name : Validate database schema
148
- run : (cd tests/Application && bin/console doctrine:schema:validate)
149
-
150
- -
151
- name : Run php-cs-fixer
119
+ name : Run php-cs-fixer
152
120
run : vendor/bin/php-cs-fixer fix --verbose --diff --dry-run
153
121
154
122
-
155
123
name : Run PHPStan
156
124
run : vendor/bin/phpstan analyse -c phpstan.neon -l max src/
157
-
158
- -
159
- name : Run PHPSpec
160
- run : vendor/bin/phpspec run --ansi -f progress --no-interaction
161
-
162
- -
163
- name : Run PHPUnit
164
- run : vendor/bin/phpunit --colors=always
0 commit comments