-
Notifications
You must be signed in to change notification settings - Fork 78
/
.travis.yml
35 lines (34 loc) · 1.49 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
sudo: false
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
language: php
php:
- "7.1"
addons:
postgresql: "9.3"
env:
global:
- DB=pgsql MOODLE_VERSION=master
before_script:
- git clone git://github.com/moodle/moodle ../moodle && cd ../moodle
- git checkout $MOODLE_VERSION
- composer self-update
- mv ../moodle-auth_googleoauth2 auth/googleoauth2
- cp config-dist.php config.php
- sh -c "sed -i -e s/'password'/''/ -e s/example.com/localhost/ -e s%192.168.1.250%localhost% -e s%/home/example%$HOME% -e 's%\(\$CFG.*bht\)%\n\1%' -e 's%\(\$CFG.*behat_wwwroot.*http://127\)%\n\1%' config.php"
- sh -c "sed -i -e s/'http:\/\/127.0.0.1\/moodle'/'http:\/\/localhost:8000'/ config.php"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database moodle;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then sed -i s/\'username\'/\'postgres\'/ config.php; fi"
- mkdir -m777 $HOME/moodledata
- "(php -S localhost:8000 &) 2> /dev/null > /dev/null"
- "wget http://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.1.jar"
- "java -jar selenium-server-standalone-2.43.1.jar &"
- echo "{\"config\":{\"github-oauth\":{\"github.com\":\"$GITHUBTOKEN\"}}}" > ~/.composer/config.json
- cd auth/googleoauth2
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
- cd ../..
- php admin/tool/behat/cli/init.php
script:
- vendor/bin/behat --config /home/travis/bht_moodledata/behatrun/behat/behat.yml --tags @auth_googleoauth2