Blame view

.travis.yml 1.74 KB
39855a9c   Tallys Martins   Added travis CI
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
branches:
  only:
    - /^ci_.*$/
    - master_noosfero

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

addons:
  apt:
    packages:
      - xvfb
      - po4a
      - iso-codes
      - tango-icon-theme
      - pidgin-data
      # for gem extensions
      - libmagickwand-dev
      - libpq-dev
      - libreadline-dev
      - libsqlite3-dev
      - libxslt1-dev

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

before_script:
  - mkdir -p tmp/{pids,cache} log cache
  - script/noosfero-plugins disableall
  - cp config/database.yml.travis config/database.yml
  - psql -c 'create database myapp_test;' -U postgres
  - git checkout db/schema.rb
  - bundle exec rake db:schema:load
  - rake db:data:minimal
  - bundle exec rake db:migrate &>/dev/null
  - unlink plugins/software_communities || true
  - unlink plugins/gov_user || true
  - unlink plugins/spb_migrations || true
  - unlink public/designs/themes/noosfero-spb-theme || true

env:
  - TASK=./../script/software_communities_ci.sh
  - TASK="bundle exec rake test:units"
  - TASK="bundle exec rake test:functionals"
  - TASK="bundle exec rake test:integration"
  - TASK="bundle exec rake cucumber LANG=en"
  - TASK="bundle exec rake selenium"
  - SLICE="1/4 TASK=bundle exec rake test:noosfero_plugins BUNDLE_OPTS=install"
  - SLICE="2/4 TASK=bundle exec rake test:noosfero_plugins BUNDLE_OPTS=install"
  - SLICE="3/4 TASK=bundle exec rake test:noosfero_plugins BUNDLE_OPTS=install"
  - SLICE="4/4 TASK=bundle exec rake test:noosfero_plugins BUNDLE_OPTS=install"

script:
  - bash -c "$TASK"