-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
78 lines (60 loc) · 2.38 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
71
72
73
74
75
76
77
78
language: php
os: linux
dist: bionic
php:
- '7.3'
- '7.4'
services:
- mysql
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
chrome: stable
cache:
yarn: true
directories:
- ~/.composer/cache/files
- $SYLIUS_CACHE_DIR
env:
global:
- APP_ENV=test
- SYLIUS_CACHE_DIR=$HOME/.sylius-cache
- SYLIUS_BUILD_DIR=etc/build
before_install:
- phpenv config-rm xdebug.ini
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- mkdir -p "${SYLIUS_CACHE_DIR}"
install:
- composer install --no-interaction --prefer-dist
- (cd tests/Application && yarn install)
before_script:
- (cd tests/Application && bin/console doctrine:database:create -vvv)
- (cd tests/Application && bin/console doctrine:schema:create -vvv)
- (cd tests/Application && bin/console assets:install public -vvv)
- (cd tests/Application && bin/console cache:warmup -vvv)
- (cd tests/Application && yarn build)
# Download Symfony CLI
- |
if [ ! -f $SYLIUS_CACHE_DIR/symfony ]; then
wget https://get.symfony.com/cli/installer -O - | bash
mv ~/.symfony/bin/symfony $SYLIUS_CACHE_DIR
fi
php -v | head -n 1 | awk '{ print $2 }' > .php-version
# Install certificates
- $SYLIUS_CACHE_DIR/symfony server:ca:install
# Run Chrome Headless
- 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 &
# Run webserver
- (cd tests/Application && $SYLIUS_CACHE_DIR/symfony server:start --port=8080 --dir=public --daemon)
script:
- composer validate
- vendor/bin/phpstan analyse -c phpstan.neon -l max src/
- vendor/bin/psalm
- vendor/bin/phpunit
- vendor/bin/phpspec run
- vendor/bin/behat --strict -vvv --no-interaction || vendor/bin/behat --strict -vvv --no-interaction --rerun
after_failure:
- vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log"