<commit_before>sudo: true
dist: trusty
language: perl
python: 2.7.10
perl:
- '5.26'
- '5.14'
addons:
  apt:
    packages:
    - libdb-dev
    - libgd2-noxpm-dev
  firefox: '58.0'
cache:
  directories:
  - extlib/
  - "$HOME/perl5/"
  - node_modules/
  - "$HOME/python/"
  - "$HOME/.nvm/"
  - "$HOME/geckodriver_$GECKODRIVER_VERSION"
  - travis_phantomjs
before_install:
env:
    global:
        - GECKODRIVER_VERSION=0.19.1
        - PHANTOMJS_VERSION=2.1.1
before_install:
  - sudo dpkg --add-architecture i386
  - sudo apt-get -qq update
  - sudo apt-get install wine1.6
install:
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
- "phantomjs --version"
- |
  if [[ ! -f ~/geckodriver_$GECKODRIVER_VERSION/geckodriver ]]; then
    rm -rf ~/geckodriver_$GECKODRIVER_VERSION;
    mkdir ~/geckodriver_$GECKODRIVER_VERSION;
    wget -O - https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz | tar -xzf - -C ~/geckodriver_$GECKODRIVER_VERSION;
  fi
- export PATH=$PATH:$HOME/geckodriver_$GECKODRIVER_VERSION
- cpanm --notest GD::Image Text::Markdown DateTime JSON
# only init the python virtualenv if it did not show up in our build cache
- if [[ ! -f ~/python/bin/activate ]]; then virtualenv ~/python; fi
- source ~/python/bin/activate
- pip install nose selenium
script:
# these versions *should* already be set in version control, but set them again here just in case
- if [[ "x$TRAVIS_TAG" != "x" ]]; then build/set_package_versions.pl $TRAVIS_TAG src/JBrowse/package.json package.json; fi
- RELEASE_VERSION=`node -e 'require("fs").readFile("src/JBrowse/package.json", (e,d)=>console.log(JSON.parse(d).version))'`
- BUILD_DIR=$PWD
- set -e
- ./setup.sh
- yarn lint
- xvfb-run npx ava --timeout=60s tests/electron_tests
- prove -Isrc/perl5 -r -j3 tests/perl_tests;
- utils/jb_run.js -p 9000 & sleep 2
- npx phantomjs tests/js_tests/run-jasmine.js http://localhost:9000/tests/js_tests/index.html
- MOZ_HEADLESS=1 SELENIUM_BROWSER=firefox JBROWSE_URL=http://localhost:9000/index.html tests/selenium_tests/travis_wrapper.sh;
# if we are building for inclusion into the `dev` branch, build the releases and test the minimal one too
- |
  if [[ "x$TRAVIS_TAG" != "x" || $TRAVIS_BRANCH = "master" || $TRAVIS_BRANCH = "dev" || $TRAVIS_PULL_REQUEST != "false" ]]; then
    make -f build/Makefile;
    rm -rf JBrowse-*/;<commit_msg>run electron tests after the phantom tests<commit_after>sudo: true
dist: trusty
language: perl
python: 2.7.10
perl:
- '5.26'
- '5.14'
addons:
  apt:
    packages:
    - libdb-dev
    - libgd2-noxpm-dev
  firefox: '58.0'
cache:
  directories:
  - extlib/
  - "$HOME/perl5/"
  - node_modules/
  - "$HOME/python/"
  - "$HOME/.nvm/"
  - "$HOME/geckodriver_$GECKODRIVER_VERSION"
  - travis_phantomjs
before_install:
env:
    global:
        - GECKODRIVER_VERSION=0.19.1
        - PHANTOMJS_VERSION=2.1.1
before_install:
  - sudo dpkg --add-architecture i386
  - sudo apt-get -qq update
  - sudo apt-get install wine1.6
install:
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
- "phantomjs --version"
- |
  if [[ ! -f ~/geckodriver_$GECKODRIVER_VERSION/geckodriver ]]; then
    rm -rf ~/geckodriver_$GECKODRIVER_VERSION;
    mkdir ~/geckodriver_$GECKODRIVER_VERSION;
    wget -O - https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz | tar -xzf - -C ~/geckodriver_$GECKODRIVER_VERSION;
  fi
- export PATH=$PATH:$HOME/geckodriver_$GECKODRIVER_VERSION
- cpanm --notest GD::Image Text::Markdown DateTime JSON
# only init the python virtualenv if it did not show up in our build cache
- if [[ ! -f ~/python/bin/activate ]]; then virtualenv ~/python; fi
- source ~/python/bin/activate
- pip install nose selenium
script:
# these versions *should* already be set in version control, but set them again here just in case
- if [[ "x$TRAVIS_TAG" != "x" ]]; then build/set_package_versions.pl $TRAVIS_TAG src/JBrowse/package.json package.json; fi
- RELEASE_VERSION=`node -e 'require("fs").readFile("src/JBrowse/package.json", (e,d)=>console.log(JSON.parse(d).version))'`
- BUILD_DIR=$PWD
- set -e
- ./setup.sh
- yarn lint
- prove -Isrc/perl5 -r -j3 tests/perl_tests;
- utils/jb_run.js -p 9000 & sleep 2
- npx phantomjs tests/js_tests/run-jasmine.js http://localhost:9000/tests/js_tests/index.html
- xvfb-run npx ava --timeout=60s tests/electron_tests
- MOZ_HEADLESS=1 SELENIUM_BROWSER=firefox JBROWSE_URL=http://localhost:9000/index.html tests/selenium_tests/travis_wrapper.sh;
# if we are building for inclusion into the `dev` branch, build the releases and test the minimal one too
- |
  if [[ "x$TRAVIS_TAG" != "x" || $TRAVIS_BRANCH = "master" || $TRAVIS_BRANCH = "dev" || $TRAVIS_PULL_REQUEST != "false" ]]; then
    make -f build/Makefile;
    rm -rf JBrowse-*/;
{'fraction_non_alphanumeric': 0.14591989363470168, 'fraction_numerical': 0.023267409007811202, 'mean_word_length': 4.0108243130724395, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6903600', 'n_tokens_mistral': 2501, 'n_tokens_neox': 2365, 'n_words': 467}