forked from PrestaShop/StarterTheme
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
64 lines (52 loc) · 1.93 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
language: php
services:
- docker
addons:
apt:
packages:
- postfix
- libappindicator1
- fonts-liberation
sauce_connect: true
cache:
directories:
- $HOME/.npm
sudo: required
dist: trusty
group: edge
env:
- PHP_VERSION=5.4
- PHP_VERSION=5.5
- PHP_VERSION=5.6
- PHP_VERSION=7
matrix:
fast_finish: true
before_install:
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
before_script:
- docker run --name mysql -e MYSQL_ROOT_PASSWORD=admin -d mysql:5.6
- docker run -e DB_SERVER=mysql -e PS_INSTALL_AUTO=0 -e PS_FOLDER_ADMIN=admin-dev -e PS_FOLDER_INSTALL=install-dev -p 80:80 -tid --link mysql --name=prestashop -v $TRAVIS_BUILD_DIR:/var/www/html/themes/StarterTheme prestashop/prestashop-git:$PHP_VERSION
- docker exec prestashop rm -Rf themes/classic
- cp config/theme.dist.yml config/theme.yml
- docker cp travis-scripts/parameters.yml.travis prestashop:/var/www/html/app/config/parameters.yml
- bash travis-scripts/wait-for-sql.sh
- docker exec prestashop php install-dev/index_cli.php --db_create=1 --db_server=mysql --db_password=admin --name=prestashop.unit.test --password=123456789
- docker cp prestashop:/var/www/html/tests/Selenium selenium
- cp travis-scripts/settings.travis.js selenium/settings.js
- cd selenium && npm install
- docker exec prestashop php tests/Selenium/prepare-shop.php
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_10.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :10 -ac -screen 0 1600x1200x16
- DISPLAY=:10 node_modules/.bin/selenium-standalone start &> /tmp/selenium.log &
- sleep 5
- export CHROME_BIN=/usr/bin/google-chrome
notifications:
email: false
script:
- ./node_modules/.bin/wdio wdio.conf.js
after_script:
- curl http://localhost/en/
- docker logs prestashop
- google-chrome --version
- cat /tmp/selenium.log
after_failure: