forked from Sylius/PayumStripePlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
92 lines (74 loc) · 2.94 KB
/
Copy path.travis.yml
File metadata and controls
92 lines (74 loc) · 2.94 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
language: php
os: linux
dist: xenial
services:
- mysql
- xvfb
- memcached
addons:
chrome: stable
cache:
yarn: true
directories:
- ~/.composer/cache/files
- ~/.cache/pip
- node_modules
- $SYLIUS_CACHE_DIR
env:
global:
- APP_ENV=test
- SYLIUS_CACHE_DIR=$HOME/.sylius-cache
- SYLIUS_BUILD_DIR=etc/build
- CHROME_DRIVER_VERSION=$(wget -q -O - http://chromedriver.storage.googleapis.com/LATEST_RELEASE)
- SELENIUM_STANDALONE_VERSION=3.141.59
- SELENIUM_SUBDIR_VERSION=$(echo "$SELENIUM_STANDALONE_VERSION" | cut -d"." -f-2)
jobs:
include:
-
php: 7.3
-
php: 7.4
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 command
- wget https://get.symfony.com/cli/installer -O - | bash
# Download and configure ChromeDriver
- |
if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ] || [ "$($SYLIUS_CACHE_DIR/chromedriver --version | grep -c $CHROME_DRIVER_VERSION)" = "0" ]; then
curl http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip > chromedriver.zip
unzip chromedriver.zip
rm chromedriver.zip
chmod +x chromedriver
mv chromedriver $SYLIUS_CACHE_DIR
fi
# Download and configure Selenium
- |
if [ ! -f $SYLIUS_CACHE_DIR/selenium.jar ] || [ "$(java -jar $SYLIUS_CACHE_DIR/selenium.jar --version | grep -c $SELENIUM_SUBDIR_VERSION)" = "0" ]; then
curl http://selenium-release.storage.googleapis.com/$SELENIUM_SUBDIR_VERSION/selenium-server-standalone-$SELENIUM_STANDALONE_VERSION.jar > selenium.jar
mv selenium.jar $SYLIUS_CACHE_DIR
fi
# Run Selenium
- java -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver -jar $SYLIUS_CACHE_DIR/selenium.jar -debug -log ${SYLIUS_BUILD_DIR}/selenium.log &
# Run webserver
- (cd tests/Application && /home/travis/.symfony/bin/symfony server:ca:install)
- (cd tests/Application && /home/travis/.symfony/bin/symfony server:start --port=8080 --dir=public --force-php-discovery --daemon)
script:
- composer validate --strict
- vendor/bin/ecs check .
- vendor/bin/phpstan analyse -c phpstan.neon -l max src/
#- 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"