forked from anspress/anspress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (51 loc) · 2.12 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
language: php
sudo: required
php:
# - 5.6
# - 7.0
- 7.1
env:
- WP_VERSION=latest WP_MULTISITE=0
# - WP_VERSION=4.8 WP_MULTISITE=0
# - WP_VERSION=4.7 WP_MULTISITE=0
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
install:
- wget http://selenium-release.storage.googleapis.com/3.8/selenium-server-standalone-3.8.1.jar
- wget https://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip && unzip chromedriver_linux64.zip
before_script:
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-fastcgi
# enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
- sudo cp -f tests/_data/travis-ci-vhost /etc/apache2/sites-available/000-default.conf
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
- echo "127.0.0.1 aptest.local" | sudo tee -a /etc/hosts
- sudo service apache2 restart
- mysql -e 'create database apacceptance;'
- mysql -e 'create database apwploader;'
- sudo apt-get install git
- composer install
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- screen -d -m java -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone-3.8.1.jar -port 4444 2>&1 &
- sleep 10
- bash tests/bin/install.sh aptest root '' localhost $WP_VERSION
# cache:
# directories: vendor
script:
- ./vendor/bin/codecept run activator --steps --debug && ./vendor/bin/codecept run ui --steps --debug && ./vendor/bin/codecept run wpunit --steps --debug
after_failure:
- bash tests/bin/upload.sh
after_success:
- bash tests/bin/upload.sh