<commit_before>language: java
jdk: oraclejdk8

# docker, see: https://docs.travis-ci.com/user/reference/overview/
sudo: false
dist: trusty

addons:
  firefox: latest
  chrome: stable

install: true # disable default mvn install

notifications:
  slack:
    secure: <KEY>

cache:
  directories:
  - $HOME/.m2

env:
  global:
  - CAPTURE_URL="http://capture-6c06138r.cloudapp.net"
  - SUT_NAME="frameworkium-bdd"
  - SUT_VERSION=${TRAVIS_BRANCH}
  - THREAD_COUNT=2
  - SELENIUM_MAJ_VER=3.141
  - SELENIUM_VER=${SELENIUM_MAJ_VER}.59
  - SELENIUM_JAR=selenium-server-standalone-${SELENIUM_VER}.jar
  - GECKO_VER=0.24.0
  - CHROME_DRIVER_VER=75.0.3770.90
  # Override Travis default to give browsers more room
  - _JAVA_OPTIONS="-Xmx1024m -Xms128m"
  # Required to turn on workaround for the following issue:
  # https://github.com/travis-ci/travis-ci/issues/8836
  - CHROME_NO_SANDBOX=true

before_script:
  # Setup X to allow non-headless browsers to run
  - export DISPLAY=:99.0
  - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1400x1024x16

  # Set up Selenium Grid Hub
  - wget --quiet https://selenium-release.storage.googleapis.com/${SELENIUM_MAJ_VER}/${SELENIUM_JAR}
  - java -Xmx128m -jar ${SELENIUM_JAR} -role hub > hub.log 2>&1 &

  # Download geckodriver
  - wget --quiet https://github.com/mozilla/geckodriver/releases/download/v${GECKO_VER}/geckodriver-v${GECKO_VER}-linux64.tar.gz
  - tar -xzf geckodriver-v${GECKO_VER}-linux64.tar.gz

  # Download chromedriver
  - wget --quiet http://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VER}/chromedriver_linux64.zip
  - unzip chromedriver_linux64.zip

  # Wait for grid hub to be up
  - until $(curl --output /dev/null --silent --fail http://localhost:4444/grid/console); do printf '.'; sleep 1; done

  # Setup Firefox Selenium Grid Node
  - java -Xmx128m -jar ${SELENIUM_JAR} -role node -hub http://localhost:4444/grid/register -browser browserName=firefox,maxInstances=${THREAD_COUNT} -maxSession ${THREAD_COUNT} -port 5555 > ff-node.log  2>&1 &

script:
  # Download deps, compile and generate tests
  - mvn test-compile -B --show-version -DskipTests=true -Dmaven.javadoc.skip=true

  # Firefox on the grid
  - mvn verify -B -Dthreads=${THREAD_COUNT} -Dconfig=FirefoxGrid.yaml -DcaptureURL=${CAPTURE_URL} -DsutName="${SUT_NAME}" -DsutVersion="${SUT_VERSION}"

  # Firefox off the grid
  - mvn verify -B -Dthreads=${THREAD_COUNT} -Dbrowser=firefox -DreuseBrowser=true -Dheadless=true -DcaptureURL=${CAPTURE_URL} -DsutName="${SUT_NAME}" -DsutVersion="${SUT_VERSION}" 2> /dev/null

  # Chrome off the grid
  - mvn verify -B -Dthreads=${THREAD_COUNT} -Dbrowser=chrome -DreuseBrowser=true -Dheadless=true -DcaptureURL=${CAPTURE_URL} -DsutName="${SUT_NAME}" -DsutVersion="${SUT_VERSION}"

  # Query Jira for which test to run and then log results to Jira
  # Disabled until we have a JIRA to use
  # - mvn verify -B -Dthreads=${THREAD_COUNT} -Dbrowser=chrome -DjiraURL="http://192.168.3.11:8080" -DjqlQuery="issueKey=TEST-1" -DresultVersion="BUILD TEST VERSION" -DzapiCycleRegex="Test Cycle" -DjiraUsername=frameworkium -DjiraPassword=<PASSWORD> -DcaptureURL=${CAPTURE_URL} -DsutName="${SUT_NAME}" -DsutVersion="${SUT_VERSION}"

  # Allure report
  - mvn allure:report -B
<commit_msg>Remove grid tests from travis. Tested as part of frameworkium-examples.<commit_after>language: java
jdk: oraclejdk8

# docker, see: https://docs.travis-ci.com/user/reference/overview/
sudo: false
dist: trusty

addons:
  firefox: latest
  chrome: stable

install: true # disable default mvn install

notifications:
  slack:
    secure: <KEY>

cache:
  directories:
  - $HOME/.m2

env:
  global:
  - CAPTURE_URL="http://capture-6c06138r.cloudapp.net"
  - SUT_NAME="frameworkium-bdd"
  - SUT_VERSION=${TRAVIS_BRANCH}
  - THREAD_COUNT=2
  - GECKO_VER=0.24.0
  - CHROME_DRIVER_VER=75.0.3770.90
  # Override Travis default to give browsers more room
  - _JAVA_OPTIONS="-Xmx1024m -Xms128m"
  # Required to turn on workaround for the following issue:
  # https://github.com/travis-ci/travis-ci/issues/8836
  - CHROME_NO_SANDBOX=true

before_script:
  # Download geckodriver
  - wget --quiet https://github.com/mozilla/geckodriver/releases/download/v${GECKO_VER}/geckodriver-v${GECKO_VER}-linux64.tar.gz
  - tar -xzf geckodriver-v${GECKO_VER}-linux64.tar.gz

  # Download chromedriver
  - wget --quiet http://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VER}/chromedriver_linux64.zip
  - unzip chromedriver_linux64.zip

script:
  # Download deps and compile
  - mvn test-compile -B --show-version -DskipTests=true -Dmaven.javadoc.skip=true

  # Firefox off the grid
  - mvn verify -B -Dthreads=${THREAD_COUNT} -Dbrowser=firefox -DreuseBrowser -Dheadless -DcaptureURL=${CAPTURE_URL} -DsutName="${SUT_NAME}" -DsutVersion="${SUT_VERSION}" -Dwebdriver.firefox.logfile=/dev/null

  # Chrome off the grid
  - mvn verify -B -Dthreads=${THREAD_COUNT} -Dbrowser=chrome -DreuseBrowser -Dheadless -DcaptureURL=${CAPTURE_URL} -DsutName="${SUT_NAME}" -DsutVersion="${SUT_VERSION}"

  # Query Jira for which test to run and then log results to Jira
  # Disabled until we have a JIRA to use
  # - mvn verify -B -Dthreads=${THREAD_COUNT} -Dbrowser=chrome -DjiraURL="http://192.168.3.11:8080" -DjqlQuery="issueKey=TEST-1" -DresultVersion="BUILD TEST VERSION" -DzapiCycleRegex="Test Cycle" -DjiraUsername=frameworkium -DjiraPassword=<PASSWORD> -DcaptureURL=${CAPTURE_URL} -DsutName="${SUT_NAME}" -DsutVersion="${SUT_VERSION}"

  # Allure report
  - mvn allure:report -B
{'fraction_non_alphanumeric': 0.13572961373390557, 'fraction_numerical': 0.028254649499284693, 'mean_word_length': 4.24671669793621, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 12, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1910159', 'n_tokens_mistral': 2261, 'n_tokens_neox': 2081, 'n_words': 421}