Commit 2ee78358 authored by Nikhil Dubbaka's avatar Nikhil Dubbaka

Adding GitLab CI file for visual regression testing with Drulenium

parent 66180d74
Pipeline #3834943 failed with stage
in 5 minutes and 43 seconds
image: php:5.6
DB_URL: 'mysql://root@'
# Install git, the php image doesn't have it installed
- apt-get update -yqq
- apt-get install git -yqq
- apt-get install wget default-jre -yqq
# Installing firefox browser
- apt-get install xvfb iceweasel unzip -yqq
- Xvfb :99 -ac &
- export DISPLAY=:99
# - firefox -v
# Firefox version 45.2.0 working with selenium-server-standalone-2.53.0
# Installing selenium
- wget
- java -jar selenium-server-standalone-2.53.0.jar &
# Installing MySQL server
- export DEBIAN_FRONTEND=noninteractive
- apt-get install mysql-server -yqq
# Installing imagemagick & PHP GD extension
- apt-get install libfreetype6-dev libjpeg62-turbo-dev libpng12-dev imagemagick -yqq
- docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
- docker-php-ext-install gd
## Installing drush
# Download latest stable release using the code below or browse to
- php -r "readfile('');" > drush
# Or use our upcoming release: php -r "readfile('');" > drush
# Make `drush` executable as a command from anywhere. Destination can be anywhere on $PATH.
- chmod +x drush
- mv drush /usr/local/bin
# Install composer dependencies
- curl -sS | php
- php composer.phar global require drush/drush:6.*
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- drush dl drupal-7 --drupal-project-rename=docroot
- cd docroot
- service mysql start
- drush site-install minimal --db-url=$DB_URL --site-name=Drulenium --yes
- drush dl drulenium-7.x-2.x-dev -y
- drush en libraries -y
- drush en drulenium drulenium_local_selenium drulenium_hosting_client -y
- drush vr-download-webdriver
- drush vset --yes drulenium_vr_config_server_opt 'drulenium_local_selenium'
- drush vset --yes drulenium_vr_config_image_server_opt 'local'
- drush vset --yes drulenium_vr_release_imagemagick_path '/usr/bin'
# Uncomment below lines if you want to dynamically pull the test cases from the project on
#- export TEST_PAGES=$(echo `wget -O-$DRULENIUM_ORG_PROJECT_UUID -q | jq -r '.tests | join(",")'`)
#- echo "$TEST_PAGES";
#- IFS=',' read -ra ADDR <<< "$TEST_PAGES"
#- for i in "${ADDR[@]}"; do drush vr-test-import $i CI-regression; done
#- drush vrc $BASELINE_URL --preset_category=CI-regression
- drush vrc $BASELINE_URL --pages="$TEST_PAGES"
- drush vrc $TEST_URL --pages="$TEST_PAGES"
- drush vr-diff
- drush vset --yes drulenium_vr_api_secret $DRULENIUM_ORG_API_SECRET -q
- drush dl gitlab_api_client-7.x-1.x-dev drulenium_gitlab-7.x-1.x-dev -y
- drush en gitlab_api_client drulenium_gitlab -y
- drush vset --yes gitlab_project "$CI_PROJECT_PATH"
- drush vset --yes gitlab_build_id $CI_BUILD_ID
- drush vr-diff-upload --project_id=$DRULENIUM_ORG_PROJECT_UUID
- cd ..
- mv docroot/sites/default/files/drulenium .
name: "drulenium-artifacts"
- drulenium
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment