forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (61 loc) · 2.84 KB
/
.travis.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
language: php
php:
- 7.2
- 7.3
- 7.4
env:
- DEVELOPMENT_BRANCH=master
services:
- mysql
- elasticsearch
git:
depth: false
before_install:
- if [[ "$(php --version | grep -cim1 xdebug)" -ge 1 ]]; then phpenv config-rm xdebug.ini; fi
- curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.1.1-amd64.deb
- sudo dpkg -i --force-confnew elasticsearch-7.1.1-amd64.deb
- sudo chmod 777 /etc/default/elasticsearch
- sudo service elasticsearch restart
- npm i -g [email protected]
install:
- if git show-ref --quiet refs/heads/$DEVELOPMENT_BRANCH; then echo "already on dev branch"; else git checkout -t origin/$DEVELOPMENT_BRANCH; git checkout $TRAVIS_BRANCH; fi
- echo "ALTER USER 'travis'@'localhost' IDENTIFIED BY 'travis';" | mysql -u root
- zip -rqm platform.zip .
- git clone --branch $DEVELOPMENT_BRANCH https://github.com/shopware/development.git
- unzip -q platform.zip -d development/platform/
- cd development
- cp -v dev-ops/github/.psh.yaml.override .
- ./psh.phar init-composer
- if [[ ! -h vendor/shopware/platform ]]; then echo 'vendor/shopware/platform should be a symlink'; exit 1; fi
script:
- nohup php -S localhost:8000 -t public > phpd.log 2>&1 &
- PHP_SERVER_PID=$!
- ./psh.phar init
- php -d memory_limit=-1 vendor/bin/phpunit --configuration vendor/shopware/platform/phpunit.xml.dist --exclude-group needsWebserver
- kill -3 $PHP_SERVER_PID
jobs:
include:
- stage: Javascript analysis
php: 7.2
script:
- cd platform/src/Administration/Resources
- npm clean-install
- npm run lerna -- bootstrap
- cd app/administration
- PROJECT_ROOT=$(pwd) node_modules/.bin/eslint --ext .js,.vue src test
- stage: PHP analysis
php: 7.2
script:
- ./psh.phar init
- php dev-ops/analyze/generate-composer.php
- php dev-ops/analyze/vendor/bin/ecs check vendor/shopware/platform/src --config vendor/shopware/platform/easy-coding-standard.yml
- php dev-ops/analyze/phpstan-config-generator.php
- php dev-ops/analyze/vendor/bin/phpstan analyze --autoload-file=dev-ops/analyze/vendor/autoload.php --configuration platform/phpstan.neon
- >
for module in $(ls platform/src/); do
echo "[PSALM: scan $module]"
php dev-ops/analyze/vendor/bin/psalm --config=vendor/shopware/platform/psalm.xml --threads=$(nproc) --diff --show-info=false vendor/shopware/platform/src/$module;
done
- php dev-ops/analyze/vendor/bin/psalm --config=vendor/shopware/platform/psalm.xml --threads=$(nproc) --show-info=false src
notifications:
email: false