Newer
Older

Rajab Natshah
committed
dist: trusty

Rajab Natshah
committed

Rajab Natshah
committed
language: php
cache:
bundler: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
- "$HOME/.npm"

Rajab Natshah
committed
- "$HOME/.selenium/cache"

Rajab Natshah
committed
php:

Rajab Natshah
committed
- 7.2

Rajab Natshah
committed
env:
- AFATG=01-website-base-requirements
- AFATG=02-user-management

Rajab Natshah
committed
- AFATG=03-admin-management

Rajab Natshah
committed
- AFATG=04-content-structure
- AFATG=05-content-management
matrix:
exclude:
# Automated Functional Acceptance Testing group: 01 website base requirements

Rajab Natshah
committed
- php: 7.2

Rajab Natshah
committed
env: AFATG=01-website-base-requirements
# Automated Functional Acceptance Testing group: 02 user management

Rajab Natshah
committed
- php: 7.2

Rajab Natshah
committed
env: AFATG=02-user-management

Rajab Natshah
committed
# Automated Functional Acceptance Testing group: 03 admin management

Rajab Natshah
committed
- php: 7.2
env: AFATG=03-admin-management

Rajab Natshah
committed
# Automated Functional Acceptance Testing group: 04 content structure

Rajab Natshah
committed
- php: 7.2

Rajab Natshah
committed
env: AFATG=04-content-structure
# Automated Functional Acceptance Testing group: 05 content-management

Rajab Natshah
committed
- php: 7.2

Rajab Natshah
committed
env: AFATG=05-content-management

Rajab Natshah
committed
mysql:

Rajab Natshah
committed
database: test_varbase807xxc

Rajab Natshah
committed
username: root
encoding: utf8
before_install:

Rajab Natshah
committed
- phpenv config-rm xdebug.ini
- phpenv rehash

Rajab Natshah
committed
- composer self-update
- composer --version

Rajab Natshah
committed
# Composer Configurations.

Rajab Natshah
committed
- export PATH="$HOME/.composer/vendor/bin:$TRAVIS_BUILD_DIR/bin:$PATH"
- export COMPOSER_EXIT_ON_PATCH_FAILURE=1

Rajab Natshah
committed
# MySQL Configurations.

Rajab Natshah
committed
- mysql -e 'SET GLOBAL wait_timeout = 5400;'
- mysql -e "SHOW VARIABLES LIKE 'wait_timeout'"
# PHP Configurations.

Rajab Natshah
committed
- echo 'max_execution_time = 1200' >> varbase.php.ini;
- echo 'max_input_time = 180' >> varbase.php.ini;
- echo 'max_input_vars = 10000' >> varbase.php.ini;
- echo 'memory_limit = 3000M' >> varbase.php.ini;

Rajab Natshah
committed
- echo 'error_reporting = E_ALL' >> varbase.php.ini;
- echo 'post_max_size = 64M' >> varbase.php.ini;
- echo 'upload_max_filesize = 32M' >> varbase.php.ini;
- echo 'max_file_uploads = 40' >> varbase.php.ini;
- echo 'sendmail_path = /bin/true' >> varbase.php.ini;
- phpenv config-add varbase.php.ini

Rajab Natshah
committed
- phpenv rehash

Rajab Natshah
committed
# Configure and run the virtual display.
- export DISPLAY=:99
- sh -e /etc/init.d/xvfb start
- Xvfb :99 -ac -screen 0 1366x768x24 &>/dev/null &

Rajab Natshah
committed
- sleep 3

Rajab Natshah
committed
# Download Chrome Driver.

Rajab Natshah
committed
- LATEST_CHROMEDRIVER=$(wget -q -O - http://chromedriver.storage.googleapis.com/LATEST_RELEASE)
- wget http://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER/chromedriver_linux64.zip

Rajab Natshah
committed
- unzip chromedriver_linux64.zip
- chmod +x chromedriver
- mkdir -p $HOME/.composer/vendor/bin
- mv -f chromedriver $HOME/.composer/vendor/bin/
- rm chromedriver_linux64.zip

Rajab Natshah
committed
# Update Chrome.
- export CHROME_BIN=/usr/bin/google-chrome
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome-stable_current_amd64.deb
- rm google-chrome-stable_current_amd64.deb
- google-chrome --version
# Run selenium standalone server.

Rajab Natshah
committed
- SELENIUM="$HOME/.selenium/cache/selenium-server-standalone-2.53.1.jar";
- if [[ ! -f $SELENIUM ]]; then wget -O $SELENIUM http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar; fi
- java -jar $SELENIUM -port 4445 > /dev/null 2>&1 &
- echo "[ OK ] Starting Selenium on the 4445 port ..."

Rajab Natshah
committed
install:

Rajab Natshah
committed
- git checkout $TRAVIS_COMMIT
## Build with the composer.

Rajab Natshah
committed
- composer install --no-interaction

Rajab Natshah
committed
## Install with drush.

Rajab Natshah
committed
- cd docroot

Rajab Natshah
committed
- drush site-install varbase --yes --site-name='Test Varbase807xxc' --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url="mysql://root:@localhost/test_varbase807xxc" varbase_multilingual_configuration.enable_multilingual=true varbase_extra_components.vmi=true varbase_extra_components.varbase_heroslider_media=true varbase_extra_components.varbase_carousels=true varbase_extra_components.varbase_search=true varbase_extra_components.varbase_blog=true varbase_extra_components.varbase_auth=true
- drush pm-enable varbase_development --yes

Rajab Natshah
committed
- drush pm-enable varbase_styleguide --yes
- drush pm-enable varbase_media_instagram --yes
- drush pm-enable varbase_media_twitter --yes

Rajab Natshah
committed
- drush pm-enable varbase_api --yes

Rajab Natshah
committed
- drush pm-enable social_auth_google --yes
- drush pm-enable social_auth_facebook --yes
- drush pm-enable social_auth_twitter --yes
- drush pm-enable social_auth_linkedin --yes

Rajab Natshah
committed
- drush config-set system.performance css.preprocess 0 --yes
- drush config-set system.performance js.preprocess 0 --yes
- drush config-set system.logging error_level all --yes

Rajab Natshah
committed
- drush cr

Rajab Natshah
committed
before_script:

Rajab Natshah
committed
- drush runserver --default-server=builtin 8080 &>/dev/null &

Rajab Natshah
committed
- sleep 5
script:

Rajab Natshah
committed
- cd ./profiles/varbase
- behat --strict tests/features/varbase/step1-init-tests/

Rajab Natshah
committed
- behat --strict tests/features/varbase/step2-apply-tests/$AFATG
# - behat --strict tests/features/varbase/step3-cleanup-tests/ # no need as we build every time.

Rajab Natshah
committed

Rajab Natshah
committed
matrix:
fast_finish: true