This repository has been archived by the owner on Oct 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 156
/
.travis.yml
55 lines (47 loc) · 2.05 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
language: php
services:
- docker
addons:
apt:
packages:
- postfix
- libappindicator1
- fonts-liberation
sudo: required
dist: trusty
env:
- PHP_VERSION=5.6
- PHP_VERSION=7
- PHP_VERSION=7.1
before_script:
- chmod a+w -R $TRAVIS_BUILD_DIR
- 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 git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- docker exec prestashop git fetch origin
- docker exec prestashop git checkout .
- docker exec prestashop git checkout $TRAVIS_BRANCH
- docker exec prestashop composer install
- 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 rm -f app/config/parameters.php
- 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 exec prestashop chown -R www-data:www-data /var/www/html/
- docker cp prestashop:/var/www/html/tests/Selenium selenium
- cp selenium/settings.travis.js selenium/settings.js
- cd selenium && npm install --silent
- 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
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