@@ -94,16 +94,74 @@ PHP integration:
94
94
--testsuite integration
95
95
--order-by default
96
96
97
+ PHP bench :
98
+ extends : .base-no-setup
99
+ stage : unit
100
+ tags :
101
+ - shopware-amd64
102
+ timeout : 30m
103
+ allow_failure : true
104
+ needs : []
105
+ services :
106
+ - name : mariadb:11.0
107
+ alias : database
108
+ entrypoint : [ "sh", "-c", "docker-entrypoint.sh $MYSQL_CMD" ]
109
+ - name : redis:7.0
110
+ alias : redis
111
+ variables :
112
+ APP_ENV : " dev"
113
+ REDIS_URL : redis://redis:6379
114
+ MYSQL_CMD : ' mariadbd'
115
+ rules :
116
+ # do not run in merge trains
117
+ - if : $CI_MERGE_REQUEST_EVENT_TYPE == "merge_train"
118
+ when : never
119
+ - !reference [ .rules, skip ]
120
+ - !reference [ .rules, run ]
121
+ - changes :
122
+ - ' **/*.php'
123
+ - ' **/*.xml'
124
+ - ' composer.json'
125
+
126
+ before_script :
127
+ - !reference [ .scripts, init, composer ]
128
+ - mkdir -p config/jwt || true
129
+ script :
130
+ - php vendor/bin/phpbench run
131
+ --report=compressed
132
+
97
133
Open Api Schema validation :
98
134
extends : .base-no-setup
135
+ image : ${CI_REGISTRY}/infrastructure/docker-base/ci-build:${CI_BUILD_IMAGE_TAG}
99
136
stage : unit
100
- timeout : 2m
101
- needs : []
102
- services :
103
- - name : swaggerapi/swagger-validator-v2:v2.0.5
104
- alias : swagger
137
+ timeout : 10m
138
+ allow_failure : true
139
+ needs : [build image]
140
+ tags :
141
+ - shopware-amd64
105
142
variables :
106
143
APP_ENV : " dev"
144
+ TEST_WEB_INSTALLER : 1
145
+ DATABASE_URL : mysql://root:app@database:3306/root
146
+ services :
147
+ - name : mysql:8
148
+ alias : database
149
+ entrypoint :
150
+ [
151
+ " sh" ,
152
+ " -c" ,
153
+ " docker-entrypoint.sh mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password --sql-require-primary-key=ON" ,
154
+ ]
155
+ - name : " ${CI_REGISTRY_IMAGE}/ci-e2e:$CI_PIPELINE_ID"
156
+ alias : shopware.test
157
+ entrypoint :
158
+ [
159
+ " sh" ,
160
+ " -c" ,
161
+ " bin/console system:generate-jwt && /entrypoint"
162
+ ]
163
+ variables :
164
+ PROJECT_ROOT : /var/www/html
107
165
rules :
108
166
# do not run in merge trains
109
167
- if : $CI_MERGE_REQUEST_EVENT_TYPE == "merge_train"
@@ -116,9 +174,18 @@ Open Api Schema validation:
116
174
- " composer.json"
117
175
before_script :
118
176
- !reference [.scripts, init, composer]
177
+ - composer run init:db
178
+ - mkdir -p config/jwt || true
179
+ - bin/console system:generate-jwt || true
119
180
script :
120
- - php ./bin/console open-api:validate http://swagger:8080/validator/debug
121
- - php ./bin/console open-api:validate --api-type=store-api http://swagger:8080/validator/debug
181
+ - export STOREFRONT_ID=$(bin/console sales-channel:list --output json | jq -r '.[] | select(.name == "Storefront") | .id')
182
+ - export OPENAPI_ACCESS_KEY=$(mysql -u root -h database -papp root -se "SELECT access_key FROM sales_channel WHERE id = 0x${STOREFRONT_ID}";)
183
+ - printf "OPENAPI_JSON_URL=http://shopware.test:8000\nSHOPWARE_ADMIN_USERNAME=admin\nSHOPWARE_ADMIN_PASSWORD=shopware\nOPENAPI_ACCESS_KEY=${OPENAPI_ACCESS_KEY}" > .env
184
+ - npx @shopware/api-gen@canary loadSchema --apiType=store --filename=storeApiSchema.json
185
+ - npx @shopware/api-gen@canary loadSchema --apiType=admin --filename=adminApiSchema.json
186
+ - npm i -g @redocly/cli@latest
187
+ - redocly lint --skip-rule operation-4xx-response --skip-rule no-server-example.com ./storeApiSchema.json
188
+ - redocly lint --skip-rule operation-4xx-response --skip-rule no-server-example.com ./adminApiSchema.json
122
189
123
190
PHP unit coverage :
124
191
extends : .base-no-setup
@@ -241,7 +308,7 @@ PHP Full:
241
308
- " php8.3"
242
309
FEATURE_ALL : ["false", "major"]
243
310
MYSQL_CMD : " mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password --sql-require-primary-key=ON"
244
- - MYSQL_IMAGE : mysql:8.0.17
311
+ - MYSQL_IMAGE : mysql:8.0.36
245
312
- MYSQL_IMAGE : mariadb:10.11
246
313
- MYSQL_IMAGE : mariadb:10.11
247
314
PREFER_LOWEST : " prefer lowest"
0 commit comments