-
Notifications
You must be signed in to change notification settings - Fork 25
/
.gitlab-ci.yml
51 lines (46 loc) · 1.47 KB
/
.gitlab-ci.yml
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
variables:
PLUGIN_NAME: SwagMigrationAssistant
PLATFORM_MIN_VERSION: '6.6.0.0'
PLATFORM_DEFAULT_VERSION: 'trunk'
PLATFORM_BRANCH: $PLATFORM_DEFAULT_VERSION
DEV_IMAGE: shopware/development:8.2-composer-2
include:
project: 'shopware/6/product/platform'
ref: 'trunk'
file: '.gitlab/templates/plugin.yml'
Danger:
stage: test
image:
name: ghcr.io/shyim/danger-php:latest
entrypoint: [ "" ]
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
before_script: [ ]
script:
- danger ci
ecs:
stage: test
script:
- composer ecs
phpunit:
script:
- apt-get update && apt-get --assume-yes install default-mysql-client
- cd tests
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.shopware.com/shopware/6/services/testdata.git testData
- cd -
- mysql -uroot -p"$MYSQL_ROOT_PASSWORD" --host mysql < tests/testData/Migration/sw55.sql
- php
-d pcov.enabled=1 -d pcov.directory=$PWD -d pcov.exclude='~(vendor|tests|node_modules)~'
${PROJECT_ROOT}/vendor/bin/phpunit
--configuration phpunit.xml.dist
--log-junit ${CI_PROJECT_DIR}/phpunit.junit.xml
--colors=never
--coverage-cobertura ${CI_PROJECT_DIR}/cobertura.xml
--coverage-text #| grep -v -E '^Shopware\\|^ Methods:' # do not output covered files lines
parallel:
matrix:
- PLATFORM_BRANCH: [ $PLATFORM_MIN_VERSION, $PLATFORM_DEFAULT_VERSION ]
phpstan:
script:
- composer dump-autoload --dev
- composer phpstan