forked from filesender/filesender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (61 loc) · 3.22 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
dist: precise
sudo: required
language: php
php:
- 5.3
addons:
sauce_connect:
username: "$SAUCE_USERNAME"
no-ssl-bump-domains: file_sender.app
hosts:
- file_sender.app
jwt:
secure: Dfap55GeoeDedJPwqtX3o7AEdZ48gGdOcgYOKNDZu4+9xKsuxFG4n9UKbF7H378XCuoS+og+vpdJ+PZhmbsvd09/zdNw8HWoRRixGG1sDLg97NOX3ImjCoeSPcOVoiYwH/uVP22NnW2orhBwzeYo6OaX9Eb7Q9soXgoNRuPC3i7lsHVx7duB3lfc1bv1Bay6RmxtBfGXj4Q7mwMseoejL0PiYICWJ2H5KFt2Cd3qTIXhl2moMREyovwji97bQXv45XW2n7pUfEgSQJvdxd5tJvcu8ngYQq7YIeOmhYf3QyYVB8NIgI/iOI1CldGCE9pTSEfMGzkATi2OKJHrHurETHEhWEgFzNheYxlh/eTZqGuHN767r1XQID/lQ/kNiOjZyvTkGw2oCwpz9G3exNTo95AaG52OB1vb8MwnupmDXk+ozm3ZECsfnad1UAawVvTYB6CgUF1sg2RQH7quhmYyDQB5j9SLJ9xMsYo06ttBtABgiAzs9P/73gVKO9f13Qvy+ZSF2elzpCBO23B1gm9j/zmi3NW8cPmYEq/6spGV4K2T7RGATAPgeX98+QHAOLMWUo7TWl/oJVH4P+ocMgdSgGpp9cyE0kAFQyZ62vU29Z4xIua1t1gDr/LbrpMj5LJls5YfhFwuNYLACKDJto+AlGj4vqWyDi0kivVqsrdGqx4=
service:
- postgresql
before_install:
- composer update --no-interaction
- cp ./travis/config.travis.pgsql.php ./config/config.php
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place ./config/config.php
- chmod -R a+x ./travis/scripts
- phpenv config-add ./travis/myconfig.ini
install:
- "./travis/scripts/postgresql-setup.sh"
- "./travis/scripts/simplesamlphp-setup.sh"
- mkdir ./log
- mkdir ./tmp
- mkdir ./files
before_script:
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-fastcgi
- 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 ssl headers
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo sed -i "s/error_reporting = E_ALL/error_reporting = E_ALL \& ~E_DEPRECATED
\& ~E_STRICT/" ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo sed -i "s/host all all 127.0.0.1\/32 trust/host all all 127.0.0.1\/32 md5/"
/etc/postgresql/9.1/main/pg_hba.conf
- sudo sed -i "s/host all all ::1\/128 trust/host all all ::1\/128 md5/"
/etc/postgresql/9.1/main/pg_hba.conf
- sudo sed -i "s/NameVirtualHost \*:80/# NameVirtualHost \*:80/" /etc/apache2/ports.conf
- sudo sed -i "s/Listen 80/# Listen 80/" /etc/apache2/ports.conf
- "~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm"
- sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/certs/filesender_test.key
-out /etc/ssl/certs/filesender_test.crt -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=file_sender.app"
- sudo cp -f travis/config.travis.apache2.conf /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
- sudo service postgresql restart
- sudo service apache2 restart
- php scripts/upgrade/database.php
- php scripts/upgrade/database.php --db_database filesenderdataset
after_failure:
- sudo cat /var/log/apache2/error.log
- sudo cat /var/log/apache2/access.log
- find ./log -type f -exec cat {} +
script:
- phpunit --configuration ./unittests/config_tests_filesender.xml
notifications:
email: false
env:
- SAUCE_TUNNEL_IDENTIFIER=$TRAVIS_JOB_NUMBER SAUCE_DONT_VERIFY_CERTS=1