forked from jegelstaff/formulize
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
70 lines (63 loc) · 3.28 KB
/
.travis.yml
File metadata and controls
70 lines (63 loc) · 3.28 KB
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
env:
global:
- secure: f1Dkf/AObhtZJf/OtM/NREIZRzVeuw/QXQkV82WrbszKdpLrm1RwfwTAgcUa+JDiE931LJ41W86JWUia3PbS3pLVSL9gSwfBPk+PU6VM7AeYIVuje1V1tXpZoGlf+0RcfGHZA3JzeNSo65QjKl5iUxrT31wnpQpQ9rdG/bXQrUg=
- secure: Xjc2qZs42LLIk4lRMc/JdFxeN5pmXUTLFd/stohOTX3g1rmRInXXqYpnXW/S15FjShqgtQAvvmnU/SV9QNpfaMhQVgS1ORVTS10gvy3aLPodW5hB9AGCDiQHXD0r9p+73LfNzenvdtmDme9Pp8PdLwb+spSroRbXgJ3tqHpXntM=
- secure: H5basCAhwXO3SicUX3VClC9KgLzoeJ1unMeYgP6+HHFxSv+81W5AJG8i8xmbziWC+dsO1c2POFbvS2BRkjhPqh9Me94g0FInBoUlVHiP0TlbSBsRv7K5Ke5fm8LHz5Obkeq2BrE6O76m6m2M301MTwZj43LVw8cPtPbXybQ0MoI=
phpenv:
- version-name: "5.5.10"
language: php
php:
- 5.5
install:
- 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 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
- sudo cp -f ci/travis/travis-ci-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
# copy selenium_debug.js which modifies some javascript behaviour to behave better with selenium
- sudo cp -f ci/travis/selenium_debug.js modules/formulize/selenium_debug.js
# set 777 on necessary directories
- sudo chmod 777 cache
- sudo chmod 777 templates_c
- sudo chmod 777 uploads
- sudo chmod 777 install
- sudo chmod 777 mainfile.php
- sudo chmod 777 cache
- sudo chmod 777 modules/formulize/cache
- sudo chmod 777 modules/formulize/temp
- sudo chmod 777 modules/formulize/upload
- sudo chmod 777 modules/formulize/templates/screens/default
- sudo chmod 777 modules/formulize/export
# make the trust path because the fcgi process cannot
- sudo mkdir selenium-848d24bb54d726d
- sudo chmod 777 selenium-848d24bb54d726d
# add to .ini and restart
- phpenv config-add ci/travis/php.ini
- sudo service apache2 restart
addons:
sauce_connect: true
before_script:
- npm install -g se-interpreter
- mysql -e 'create database formulize;'
# Uncomment the next line to initialize the database as if all existing tests have run.
# This is useful for quickly running just one new test, to see if it is working.
# Alter the ci/travis/interpreter_config.json file to refer to your one test by name
# instead of referring to * for all tests.
# - mysql formulize < ci/formulize_test_db.sql
- echo "USE mysql;\nUPDATE user SET password=PASSWORD('password') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
script:
- se-interpreter ci/travis/interpreter_config.json
- cat "error.log"
- curl http://localhost/index.php
after_script:
# Include '[update test db]' in a commit message from the master branch, if you want
# to reset the ci/formulize_test_db.sql to be based on all the current tests.
# ONLY DO THIS WITH COMMITS FROM THE MASTER BRANCH!!
# DO NOT DO THIS IN A BRANCH THAT HAS AN ACTIVE PULL REQUEST!!
- COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
- if test "${COMMIT_MESSAGE#*'[update test db]'}" != "$COMMIT_MESSAGE"; then bash ci/travis/update-test-db.sh; fi;