-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
78 lines (67 loc) · 2.04 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
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
language: php
php:
# - 5.6
# - 7.0
# - 7.1
# - 7.2
- 7.3
- 7.4
- 8.0
rvm:
- 2.2
addons:
sauce_connect: true
sudo: required
dist: trusty
group: edge
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3f2dee1a025739ac5da7
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
# optionally specify a list of environments, for example to test different RDBMS
env:
- DB=mysql
before_install:
- sudo apt-get update
- sudo apt-get install ruby-full
- sudo gem install sass -v 3.4.25
- chmod +x ./travis-ci/*.sh
- chmod +x ./scripts/*.sh
- cp BuildConfig.json.example BuildConfig.json
# prepare travis ci for the build process
install:
- npm run composer-install
- npm run orm-gen
- npm install
- npm run tests-install
# linters
before_script:
- ./travis-ci/setup-db.sh
- cp $TRAVIS_BUILD_DIR/travis-ci/Config.php $TRAVIS_BUILD_DIR/src/Include/Config.php
- 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 cp $TRAVIS_BUILD_DIR/travis-ci/www.conf ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
- sudo a2enmod rewrite proxy_fcgi
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
- sudo cp -f travis-ci/000-default.conf /etc/apache2/sites-available/000-default.conf
- sudo chmod -R a+rwx /home
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)/src?g" --in-place /etc/apache2/sites-available/000-default.conf
- sudo service apache2 restart
# execute tests
script:
- npm test
before_deploy:
- npm run package
deploy:
skip_cleanup: true
provider: script
script: npm run demosite
on:
all_branches: true
php: 7.0
condition: "$TRAVIS_BRANCH == 'master' || $TRAVIS_BRANCH = 'develop'"