-
Notifications
You must be signed in to change notification settings - Fork 35
/
.travis.yml
163 lines (132 loc) · 5.15 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
version: ~> 1.0
# make sure we test on latest xenial environment
sudo: required
os: linux
dist: xenial
language: php
# PHP 7
php:
- 7.2
addons:
artifacts: true
chrome: stable
services:
- mysql
- redis
# Cache Composer & Drush directories.
cache:
directories:
- $HOME/config/.composer/cache
- $HOME/.drush/cache
mysql:
database: drupal
username: root
encoding: utf8
# whitelist
branches:
only:
- master
- travis-ci
# Cut down on git depth from default of 50
git:
depth: 3
env:
global:
# add composer's global bin directory to the path
# see: https://github.com/drush-ops/drush#install---composer
- PATH="$PATH:$HOME/.composer/vendor/bin"
# force composer 1.8+ to use a specific folder as home
- COMPOSER_HOME="$HOME/.composer/"
before_install:
# Setup display for Selenium
- export DISPLAY=:99.0
#- sh -e /etc/init.d/xvfb start
# Added screen size (1024x768 - as defined in /etc/init.d/xvfb - is way too small)
- /sbin/start-stop-daemon --start --verbose --pidfile /tmp/cucumber_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 2560x1440x16
- sleep 1
# Disable PHP features - XDebug
- phpenv config-rm xdebug.ini
- phpenv config-add travis.php.ini
install:
- sudo apt-get update > /dev/null
- "mysql -e 'create database drupal;'"
# Install latest Drush 7.x.
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer global require --no-interaction drush/drush:8.*
# Download LATEST_RELEASE of ChromeDriver
- CHROME_MAIN_VERSION=`google-chrome-stable --version | sed -E 's/(^Google Chrome |\.[0-9]+ )//g'`
- echo $CHROME_MAIN_VERSION
- CHROMEDRIVER_VERSION=`curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_MAIN_VERSION"`
- echo $CHROMEDRIVER_VERSION
- curl "https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip" -O
- unzip chromedriver_linux64.zip -d ~/bin
- cd ~/bin
- ls -las
- export PATH=/home/travis/bin:$PATH
# existing ChromeDriver commands
- cd ~/
# https://sites.google.com/a/chromium.org/chromedriver/downloads - Downloads page
# https://chromedriver.storage.googleapis.com/ - XML of latest downloads
# - wget -N https://chromedriver.storage.googleapis.com/80.0.3987.16/chromedriver_linux64.zip
# - wget -N https://chromedriver.storage.googleapis.com/$(curl -L https://chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip
#- unzip ~/chromedriver_linux64.zip -d ~/
#- rm ~/chromedriver_linux64.zip
#- sudo mv -f ~/chromedriver /usr/local/share/
#- sudo chmod +x /usr/local/share/chromedriver
#- sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
#- export CHROME_BIN=chromium-browser
# Build Behat dependencies
- cd $TRAVIS_BUILD_DIR/profiles/openasu/modules/panopoly/panopoly_test/behat
- composer install --no-interaction
# Build Behat dependencies
- cd ../../../custom/webspark_test/behat
- composer install --no-interaction
- cd $TRAVIS_BUILD_DIR
# Build Codebase
- mkdir private_files
# create directory for behat screenshots
- sudo mkdir -m 777 /behat_screenshot
- mkdir -p sites/default/files/private/isearch/feeds
# Setup files
- sudo chmod -R 777 sites
# Get Selenium
# - 3.9/selenium-server-standalone-3.9.1.jar
- wget https://selenium-release.storage.googleapis.com/4.0/selenium-server-standalone-4.0.0-alpha-2.jar
- java -jar -Dwebdriver.chrome.driver="/home/travis/bin/chromedriver" selenium-server-standalone-4.0.0-alpha-2.jar > /dev/null 2>&1 &
# - java -jar selenium-server-standalone-3.9.1.jar > /dev/null 2>&1 &
- sleep 3
# Disable sendmail
- echo sendmail_path=`which true` >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
before_script:
# Do the site install
- drush si openasu --db-url=mysql://root:@127.0.0.1/drupal --account-name=admin --account-pass=admin [email protected] --site-name="Webspark" --yes
- drush runserver > /dev/null 2>&1 &
- sleep 3
# Enable correct themes as defaults (currently WS2.0)
- drush pm-enable college --yes
- drush vset theme_default college
- drush pm-disable innovation --yes
# Turn on ASU Brand filtering of GTM snippet, Cookie Consent (GDPR) addition after v4.7
- drush vset --always-set asu_brand_ci_testing 1
- drush vset --always-set asu_brand_header_version stable
- drush vset --always-set block_cache 0
- drush vset --always-set cache 0
- drush pm-disable navbar admin_menu admin_menu_toolbar --yes
- drush cc all
# Enable Panopoly Test module
- drush pm-enable panopoly_test --yes
- drush pm-enable webspark_test --yes
- cd ./profiles/openasu/modules/panopoly/panopoly_test/behat
script:
- bin/behat --init
- bin/behat --colors --tags '~@webspark_ignore' --tags '~@panopoly_demo' --tags '~@panopoly_search' --config behat.travis.yml
- cd ../../../custom/webspark_test/behat
- bin/behat --init
- bin/behat --colors --tags '~@webspark_ignore' --config behat.travis.yml
after_script:
- drush pm-disable panopoly_test --yes
# Turn off ASU Brand filtering of GTM snippet
- drush vset --always-set asu_brand_ci_testing 0
notifications:
email: