forked from chamilo/chamilo-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·133 lines (119 loc) · 4.71 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
dist: bionic
os: linux
language: php
php:
7.2
addons:
apt:
packages:
- apache2
- postfix
- libappindicator1
- fonts-liberation
services:
- mysql
- xvfb
cache:
yarn: true
directories:
- $HOME/.composer/cache/files
matrix:
fast_finish: false
include:
- php: 7.2
#- php: 7.3
env:
global:
- VHOST_URL=localhost
- CHAMILO_VERSION=master
before_install:
- curl http://localhost/php.php
- mysqld --version
- apache2 -v
- php -m
- php -ini | grep memory_limit
# Fix travis error https://github.com/travis-ci/travis-ci/issues/8607
- rm -vf /etc/apt/sources.list.d/*riak*
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
# Get Chrome driver
- wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip && unzip chromedriver_linux64.zip
- sudo mv chromedriver /usr/bin
- sudo chmod +x /usr/bin/chromedriver
- chromedriver --version
# Get Selenium
- wget http://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar
# Check java
- java -version
- java -jar selenium-server-standalone-3.141.59.jar -log selenium.log > /dev/null &
# Use default config
- apt-get update
- apt-get install php php-mysql php-xml php-gd php-intl php-soap php-bcmath
#- sudo apt-get install php7.3 php7.3-mysql php7.3-xml php7.3-gd php7.3-intl php7.3-soap php7.3-bcmath
#- sudo a2enmod rewrite actions fastcgi alias
# Apache & php-fpm configuration
- bash tests/travis/setup-php-fpm.sh
- bash tests/travis/setup-apache.sh
# Starting Apache
- service apache2 restart
- cat /etc/hosts
- curl http://localhost/php.php
install:
- phpenv config-rm xdebug.ini || return 0
- composer install --prefer-source --no-interaction
# Install bundle js/css
- php bin/console assets:install
# Permissions
- chmod -R 777 var public
# Dump js routes
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
# Install third party js/css libraries
- yarn install
- ./node_modules/.bin/encore dev
# Permissions
- chown -R www-data:www-data $TRAVIS_BUILD_DIR
- chown -R 775 $TRAVIS_BUILD_DIR
- chmod +x /home/travis/build
- ls -la public/build
script:
- cd tests/behat
# - travis_wait 45 ../../vendor/behat/behat/bin/behat -v
- ../../vendor/behat/behat/bin/behat features/actionInstall.feature -v
- cd ..
- cd ..
# Set to APP_ENV to test
- sed -i "s/APP_ENV='dev'/APP_ENV='test'/g" .env.local
- cd tests/behat
- ../../vendor/behat/behat/bin/behat features/adminFillUsers.feature -v
- ../../vendor/behat/behat/bin/behat features/adminSettings.feature -v
- ../../vendor/behat/behat/bin/behat features/career.feature -v
- ../../vendor/behat/behat/bin/behat features/class.feature -v
- ../../vendor/behat/behat/bin/behat features/companyReports.feature -v
- ../../vendor/behat/behat/bin/behat features/course.feature -v
- ../../vendor/behat/behat/bin/behat features/course_user_registration.feature -v
- ../../vendor/behat/behat/bin/behat features/createUser.feature -v
- ../../vendor/behat/behat/bin/behat features/createUserViaCSV.feature -v
- ../../vendor/behat/behat/bin/behat features/extraFieldUser.feature -v
- ../../vendor/behat/behat/bin/behat features/profile.feature -v
- ../../vendor/behat/behat/bin/behat features/promotion.feature -v
- ../../vendor/behat/behat/bin/behat features/registration.feature -v
- ../../vendor/behat/behat/bin/behat features/sessionAccess.feature -v
- ../../vendor/behat/behat/bin/behat features/sessionManagement.feature -v
- ../../vendor/behat/behat/bin/behat features/socialGroup.feature -v
- ../../vendor/behat/behat/bin/behat features/systemAnnouncements.feature -v
- ../../vendor/behat/behat/bin/behat features/ticket.feature -v
- ../../vendor/behat/behat/bin/behat features/toolAgenda.feature -v
- ../../vendor/behat/behat/bin/behat features/toolAnnouncement.feature -v
- ../../vendor/behat/behat/bin/behat features/toolDocument.feature -v
- ../../vendor/behat/behat/bin/behat features/toolExercise.feature -v
- ../../vendor/behat/behat/bin/behat features/toolForum.feature -v
- ../../vendor/behat/behat/bin/behat features/toolGroup.feature -v
- ../../vendor/behat/behat/bin/behat features/toolLink.feature -v
- ../../vendor/behat/behat/bin/behat features/toolLp.feature -v
- ../../vendor/behat/behat/bin/behat features/toolWork.feature -v
after_failure:
- cat /var/log/apache2/error.log
# configure notifications (email, IRC, campfire etc)
notifications:
slack:
rooms:
secure: wlaaOwNt58ENjx2PEciISr4VBRWXp6YfI8TAZgvhDO1H0XpLByRYyktgm/+h6NQWvTEcPGBSFcsIA6K0N8FA52/fdDQFxbe0en+b4q7AGNLdjTRdszfZ4AbIdRngSBFKRmXC5IX0dEx/nGWYp5fRs26QPvgBadpj8M11BnL7qhg=