forked from wolfcms/wolfcms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (73 loc) · 2.8 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
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
language: php
# Which PHP versions we want to test
php:
- "5.6"
- "5.5"
- "5.4"
- "5.3"
# Which versions are allowed to fail
matrix:
allow_failures:
- php: 5.6
- php: 5.5
# Which branches we want to test
branches:
only:
- master
- develop
- /^release-.*$/
# Which DBs we want to test
env:
- DB=mysql
- DB=postgres
- DB=sqlite
before_script:
- wget http://getcomposer.org/composer.phar
- php composer.phar install --dev --no-interaction
# Setup for Selenium tests
#- export DISPLAY=:99
#- export WEB_FIXTURES_HOST=http://localhost
#- export WEB_FIXTURES_BROWSER=firefox
# Selenium first, give it time to boot..
#- wget http://selenium.googlecode.com/files/selenium-server-standalone-2.28.0.jar
#- java -jar selenium-server-standalone-2.28.0.jar > /dev/null &
# Install dependencies
#- sudo apt-get update
#- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-mysql
#- sudo sed -i -e "s,/var/www,$(pwd)/wolfcms/tests/selenium,g" /etc/apache2/sites-available/default
#- sudo /etc/init.d/apache2 restart
# Install Wolf CMS files
# todo
# Setup rights for Wolf CMS files
# Start up graphics
#- sh -e /etc/init.d/xvfb start
#- sleep 5
# Run Wolf CMS Installer using Selenium
#- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS wolfcms_selenium;' -U postgres; fi"
#- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database wolfcms_selenium;' -U postgres; fi"
#- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'DROP DATABASE IF EXISTS wolfcms_selenium;'; fi"
#- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database wolfcms_selenium;'; fi"
# todo
# Change admin password in DB
#- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'UPDATE wolfcms_selenium SET password='TBD',salt='TDB' WHERE username=admin;' -U postgres; fi"
#- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'UPDATE wolfcms_selenium SET password='TBD',salt='TDB' WHERE username=admin;'; fi"
# Setup fresh databases for PHPUnit tests
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS wolfcms_test;' -U postgres; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database wolfcms_test;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'DROP DATABASE IF EXISTS wolfcms_test;'; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database wolfcms_test;'; fi"
# Clone the tests from the separate repo
- git clone --depth=100 --quiet git://github.com/wolfcms/wolfcms-phpunit.git test
script:
- cd test
- mkdir -p build/logs
- phpunit -c phpunit.travisci.xml
after_script:
- cd ..
- php vendor/bin/coveralls --config test/.coveralls.yml -v
notifications:
irc:
channels:
- "chat.freenode.net#wolfcms"
on_success: change
on_failure: change