cirandas.net

ref: master

./.travis.yml


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
# noosfero-ecosol: only test on specific branches
branches:
  except:
    - master
    - next

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

# Ensure Container-based environment for faster boot times.
# See https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
sudo: false

##
# Stick with precise as trusty is at least 50% slower.
#
#dist: trusty

jdk:
  # openjdk8 isn't available on precise
  - oraclejdk8

language: ruby
rvm:
  - 2.4.1

cache: bundler

services:
  - postgresql

addons:
  postgresql: '9.4'
  # same as in docker ci image
  #firefox: '45.7.0'
  apt:
    packages:
      - tango-icon-theme
      - pidgin-data
  artifacts:
    paths:
      - $(ls tmp/artifact* | tr "\n" ":")


before_install:
  # geckodriver, from http://www.columbia.edu/~njn2118/journal/2016/10/28.html
  - wget https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux64.tar.gz
  - mkdir geckodriver
  - tar -xzf geckodriver-v0.14.0-linux64.tar.gz -C geckodriver
  - export PATH=$PATH:$PWD/geckodriver
  # elasticsearch 2
  - wget ${ES_DOWNLOAD_URL}
  - tar -xzf elasticsearch-${ES_VERSION}.tar.gz
  - ./elasticsearch-${ES_VERSION}/bin/elasticsearch &

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:
  global:
    - ES_VERSION=1.7.6
    - ES_DOWNLOAD_URL=https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
    - LANG=en
  matrix:
    - TASK=spec SPEC=spec/models
    - TASK=test:api
    - TASK=test:units
    - TASK=test:functionals
    - TASK=test:integration
    - SLICE=1/2 TASK=cucumber
    - SLICE=2/2 TASK=cucumber
    - SLICE=1/4 TASK=selenium
    - SLICE=2/4 TASK=selenium
    - SLICE=3/4 TASK=selenium
    - SLICE=4/4 TASK=selenium
    - SLICE=1/5 TASK=test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install
    - SLICE=2/5 TASK=test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install
    - SLICE=3/5 TASK=test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install
    - SLICE=4/5 TASK=test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install
    - SLICE=5/5 TASK=test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install
    # chrome hanging on travis
    #- SLICE=1/4 TASK=selenium SELENIUM_DRIVER=chrome
    #- SLICE=2/4 TASK=selenium SELENIUM_DRIVER=chrome
    #- SLICE=3/4 TASK=selenium SELENIUM_DRIVER=chrome
    #- SLICE=4/4 TASK=selenium SELENIUM_DRIVER=chrome

matrix:
  allow_failures:
    - env: SLICE=1/4 TASK=selenium SELENIUM_DRIVER=chrome
    - env: SLICE=2/4 TASK=selenium SELENIUM_DRIVER=chrome
    - env: SLICE=3/4 TASK=selenium SELENIUM_DRIVER=chrome
    - env: SLICE=4/4 TASK=selenium SELENIUM_DRIVER=chrome

script:
  - bundle exec rake $TASK