<commit_before>sudo: false
services:
- docker
language: node_js
node_js:
- '6'
cache:
  directories:
  - travis_phantomjs
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
- cd app
- export PHANTOMJS_VERSION=2.1.1
- 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
install:
- npm install
before_script:
- bower install
script:
- grunt build
- grunt test
- cd ..
after_success:
- echo "TRAVIS_BRANCH='$TRAVIS_BRANCH'" \
  ;if [ "$TRAVIS_BRANCH" == "master" ]; then
     echo "Building and Pushing new image" \
     && docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}" && echo "Login ok" \
     && docker build -t ${DOCKER_REPO}/${DOCKER_IMAGE} ${DOCKER_BUILDDIR} && echo "Build complete" \
     && docker push ${DOCKER_REPO}/${DOCKER_IMAGE} && echo "Push complete"
  ;else
     echo "Not master branch, skipping docker"
  ;fi
- cat app/coverage/lcov.info | app/node_modules/.bin/codacy-coverage -c $TRAVIS_COMMIT
notifications:
  slack:
    secure: DaekD2e7w2UJwMdaBZ7/CPfaEec7pIAJ/LryutTM7ZLYXrvmkUxPWXAigjPwQhB899j/SBrisQiXxfBMYLCLdZ1OlZQZXS9ZGntqyfATd7a/txV9mfMatYesLdA15iGbNwwD2jrA8pjmtLV9Wk7mq/Sm/csTTVk8sldXm4kFNgw33mFPZR/IowvVNxB+GrS63g8tb/6IpAL66NdGxpyy48K4QP8iD1272nhrkO7nnQ3UBDCYXsG96jrnpnhPTxHXPYfi9GO/U1oaa3I0mLEJWh1B0ueXa+ZOmt4ZQVllBimpmstihi3sLkeENo06TNQQ8Qfd6Zqa+li6aEznULtqtc7LYBcP1BJjSnmWSCsRleE1CIedtnEjXF1mWLd0U7Tk8XnHLmErcKJt+n4nqlved+I446YgNehmJZCgAaKE4h6ukxQIGxQDwwFJcRNH3dfA96N0XZ7ipZcZD2RKLqcR4ZvV0zCunlUjR1AobwJMjgP5xjmhVYsiAtCfs+fjED2BcfQq6EoK2Yem5qOysoJzdEfpEcdbwQgdcTiK0OuInX3QWj1Y2NkXd9md7rEUf675+2PSb1S3CMz/4tiWWzLvS8/S7r7TnYHBvD6dD4I+IVDBD0NpLZaJVZp4repPioT3814nA2qWctW/cdEvsKF9fmTMzngKvHFU3TGlcWdlrI8=<commit_msg>use common docker publish script<commit_after>sudo: false
services:
- docker
language: node_js
node_js:
- '6'
cache:
  directories:
  - travis_phantomjs
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
- cd app
- export PHANTOMJS_VERSION=2.1.1
- 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
install:
- npm install
before_script:
- bower install
script:
- grunt build
- grunt test
- cd ..
after_success:
- echo "TRAVIS_BRANCH='$TRAVIS_BRANCH'"
- bash <(curl -s https://raw.githubusercontent.com/gameontext/gameon/master/images/dockerhub.sh)
- cat app/coverage/lcov.info | app/node_modules/.bin/codacy-coverage -c $TRAVIS_COMMIT
notifications:
  slack:
    secure: <KEY>
{'fraction_non_alphanumeric': 0.12368815592203898, 'fraction_numerical': 0.03973013493253373, 'mean_word_length': 5.415064102564102, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2515781', 'n_tokens_mistral': 1900, 'n_tokens_neox': 1763, 'n_words': 244}