<commit_before>notifications:
  irc:
    channels:
      - "chat.freenode.net#noosfero"
      - "chat.freenode.net#noosfero-br"
    template:
      - "%{repository_slug} %{branch} %{commit} %{commit_subject} - %{result} %{build_url}"

dist: trusty
language: ruby
rvm:
  - 2.3.0

addons:
  apt:
    packages:
      - po4a
      - iso-codes
      - tango-icon-theme
      - pidgin-data
      # for gem extensions
      - libmagickwand-dev
      - libpq-dev
      - libreadline-dev
      - libxslt1-dev
  artifacts:
    paths:
      - $(ls tmp/artifact* | tr "\n" ":")

# workaround for https://github.com/travis-ci/travis-ci/issues/4536
before_install:
  - export GEM_HOME=$PWD/vendor/bundle/ruby/2.3.0
  - gem install bundler
cache: bundler

before_script:
  - mkdir -p tmp/{pids,cache} log cache
  - script/noosfero-plugins disableall
  #- bundle exec rake makemo &>/dev/null
# database
  - cp config/database.yml.travis config/database.yml
  - psql -c 'create database myapp_test;' -U postgres
  - bundle exec rake db:schema:load &>/dev/null
  - bundle exec rake db:migrate &>/dev/null

env:
  - TASK=test:api
  - TASK=test:units
  - TASK=test:functionals
  - TASK=test:integration
  - TASK=cucumber LANG=en
  - SLICE=1/3 TASK=selenium
  - SLICE=2/3 TASK=selenium
  - SLICE=3/3 TASK=selenium
  - SLICE=1/4 TASK=test:noosfero_plugins BUNDLE_OPTS=install
  - SLICE=2/4 TASK=test:noosfero_plugins BUNDLE_OPTS=install
  - SLICE=3/4 TASK=test:noosfero_plugins BUNDLE_OPTS=install
  - SLICE=4/4 TASK=test:noosfero_plugins BUNDLE_OPTS=install

script:
  - bundle exec rake $TASK

<commit_msg>travis: move back to ruby 2.2 as 2.3 is unstable on travis<commit_after>notifications:
  irc:
    channels:
      - "chat.freenode.net#noosfero"
      - "chat.freenode.net#noosfero-br"
    template:
      - "%{repository_slug} %{branch} %{commit} %{commit_subject} - %{result} %{build_url}"

#dist: trusty
language: ruby
rvm:
  - 2.2
  # ruby 2.3 works but isn't stable on travis

addons:
  apt:
    packages:
      - po4a
      - iso-codes
      - tango-icon-theme
      - pidgin-data
      # for gem extensions
      - libmagickwand-dev
      - libpq-dev
      - libreadline-dev
      - libxslt1-dev
  artifacts:
    paths:
      - $(ls tmp/artifact* | tr "\n" ":")

# workaround for https://github.com/travis-ci/travis-ci/issues/4536
before_install:
  - export GEM_HOME=$PWD/vendor/bundle/ruby/2.2.0
  - gem install bundler
cache: bundler

before_script:
  - mkdir -p tmp/{pids,cache} log cache
  - script/noosfero-plugins disableall
  #- bundle exec rake makemo &>/dev/null
# database
  - cp config/database.yml.travis config/database.yml
  - psql -c 'create database myapp_test;' -U postgres
  - bundle exec rake db:schema:load
  - bundle exec rake db:migrate &>/dev/null

env:
  - TASK=test:api
  - TASK=test:units
  - TASK=test:functionals
  - TASK=test:integration
  - TASK=cucumber LANG=en
  - SLICE=1/3 TASK=selenium
  - SLICE=2/3 TASK=selenium
  - SLICE=3/3 TASK=selenium
  - SLICE=1/4 TASK=test:noosfero_plugins BUNDLE_OPTS=install
  - SLICE=2/4 TASK=test:noosfero_plugins BUNDLE_OPTS=install
  - SLICE=3/4 TASK=test:noosfero_plugins BUNDLE_OPTS=install
  - SLICE=4/4 TASK=test:noosfero_plugins BUNDLE_OPTS=install

script:
  - bundle exec rake $TASK


{'fraction_non_alphanumeric': 0.12553846153846154, 'fraction_numerical': 0.017538461538461537, 'mean_word_length': 2.9646341463414636, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4837154', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1301, 'n_words': 244}