forked from anspress/categories-for-anspress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (41 loc) · 1.79 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
language: php
notifications:
email:
on_success: never
on_failure: change
services:
- mysql
php:
- 5.6
env:
- WP_VERSION=latest WP_MULTISITE=0
# before_install:
# - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
# - openssl aes-256-cbc -K $encrypted_ffa6df0139c0_key -iv $encrypted_ffa6df0139c0_iv -in git_key.txt.enc -out git_key -d
install:
- wget http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar
before_script:
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-fastcgi
- sudo apt-get install unzip
# 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 a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- echo "$(curl -fsSL https://gist.github.com/rahularyan/5b179508f63cebbce486/raw/gistfile1.txt)" | sed -e "s,PATH,`pwd`/www,g" | sudo tee /etc/apache2/sites-available/default > /dev/null
- echo "127.0.0.1 wptest.localhost" | sudo tee -a /etc/hosts
- sudo service apache2 restart
- sudo apt-get install git
- wget http://codeception.com/codecept.phar
- sudo curl -LsS http://codeception.com/codecept.phar -o /usr/local/bin/codecept
- sudo chmod a+x /usr/local/bin/codecept
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- java -jar selenium-server-standalone-2.42.2.jar -port 4444 -Djava.security.egd=file:///dev/urandom switch > /dev/null &
- sleep 5
- bash tests/bin/install.sh wptest root '' localhost $WP_VERSION
script: codecept run --steps
after_failure:
- bash tests/bin/upload.sh