Commit a37162a8c0a5edfcce249f5af2e91e3923a058f6
Exists in
colab
and in
2 other branches
Merge pull request #353 from mezuro/update_travis_yml
Update travis yml
Showing
4 changed files
with
41 additions
and
15 deletions
Show diff stats
.travis.yml
1 | language: ruby | 1 | language: ruby |
2 | rvm: | 2 | rvm: |
3 | - 2.3.0 | 3 | - 2.3.0 |
4 | + - 2.0.0-p598 # CentOS 7 | ||
5 | + - 2.1.5 # Debian 8 | ||
6 | + | ||
4 | addons: | 7 | addons: |
5 | postgresql: "9.3" | 8 | postgresql: "9.3" |
6 | 9 | ||
10 | +before_install: | ||
11 | + - if ruby --version | cut -d ' ' -f 2 | grep -q 2.1.5p273 ; then gem update --system 2.4.8; fi | ||
12 | + | ||
7 | before_script: | 13 | before_script: |
8 | - - git clone https://github.com/mezuro/kalibro_install.git -b v4.0 kalibro_install | 14 | + - git clone https://github.com/mezuro/kalibro_install.git -b v4.2 kalibro_install |
15 | + - export KALIBRO_CONFIGURATIONS_START=0 | ||
16 | + - export KALIBRO_PROCESSOR_START=0 | ||
9 | - pushd kalibro_install | 17 | - pushd kalibro_install |
10 | - # Remove bugged libzmq3 package, see https://github.com/travis-ci/travis-ci/issues/982 and https://github.com/travis-ci/travis-ci/issues/1715 for details | 18 | + # |
19 | + # Remove bugged libzmq3 package, see https://github.com/travis-ci/travis-ci/issues/982 and https://github.com/travis-ci/travis-ci/issues/1715 for details | ||
20 | + # | ||
21 | + # In 2016/04/27 the state is: | ||
22 | + # * The first issue has been closed and apparently fixed by a PR | ||
23 | + # * The second one has been closed without a PR and removing the workaround below breaks the build | ||
24 | + # | ||
11 | - sudo apt-get remove libzmq3 | 25 | - sudo apt-get remove libzmq3 |
12 | - - export KALIBRO_PROCESSOR_VERSION=v1.2.1 | ||
13 | - - export KALIBRO_CONFIGURATIONS_VERSION=v2.0.0 | ||
14 | - bash install.sh | 26 | - bash install.sh |
15 | - popd | 27 | - popd |
16 | - cp config/database.yml.sample config/database.yml | 28 | - cp config/database.yml.sample config/database.yml |
17 | - - bundle exec rake db:setup | 29 | + # Do not run setup as the Kalibro services are up and this is not even necessary! |
30 | + - bundle exec rake db:create | ||
31 | + - bundle exec rake db:migrate | ||
18 | - cp features/support/kalibro_cucumber_helpers.yml.sample features/support/kalibro_cucumber_helpers.yml | 32 | - cp features/support/kalibro_cucumber_helpers.yml.sample features/support/kalibro_cucumber_helpers.yml |
19 | - export BUNDLE_GEMFILE=$PWD/Gemfile | 33 | - export BUNDLE_GEMFILE=$PWD/Gemfile |
20 | - export CODECLIMATE_REPO_TOKEN=045c2433d496f108c0c6afa5516a72ddbfb1868fb34bf7a9bd095b7a0ea34a79 | 34 | - export CODECLIMATE_REPO_TOKEN=045c2433d496f108c0c6afa5516a72ddbfb1868fb34bf7a9bd095b7a0ea34a79 |
21 | 35 | ||
22 | script: | 36 | script: |
37 | + # Unit tests | ||
23 | - bundle exec rake spec | 38 | - bundle exec rake spec |
24 | - bundle exec rake konacha:run | 39 | - bundle exec rake konacha:run |
40 | + # | ||
41 | + # Start kalibro for acceptance tests | ||
42 | + - pushd kalibro_install | ||
43 | + - bash start_kalibro_services.sh | ||
44 | + - popd | ||
45 | + # | ||
46 | + # Acceptance tests | ||
25 | - bundle exec rake cucumber | 47 | - bundle exec rake cucumber |
26 | 48 | ||
27 | notifications: | 49 | notifications: |
CHANGELOG.rdoc
@@ -13,10 +13,13 @@ Prezento is the web interface for Mezuro. | @@ -13,10 +13,13 @@ Prezento is the web interface for Mezuro. | ||
13 | * Pluralize navigation menu links | 13 | * Pluralize navigation menu links |
14 | * Add missing translation for CompoundMetric | 14 | * Add missing translation for CompoundMetric |
15 | * Make Compound Metric Config. metric list not include Hotspot metrics | 15 | * Make Compound Metric Config. metric list not include Hotspot metrics |
16 | -* Fix 'Tree Metrics' and 'Hotspot Metrics' PT translations in Configuration show view | 16 | +* Fix 'Tree Metrics' and 'Hotspot Metrics' PT translations in Configuration show view |
17 | * Show the notify push url for the repository's owner (Gitlab only) | 17 | * Show the notify push url for the repository's owner (Gitlab only) |
18 | * Support for hiding repositories | 18 | * Support for hiding repositories |
19 | * Fix home latest content caching effectiveness | 19 | * Fix home latest content caching effectiveness |
20 | +* Update travis script | ||
21 | +* Support for ruby 2.0.0-p598 (CentOS 7 default) and 2.1.5 (Debian 8 default) | ||
22 | +* Make Travis fail if minimun unit test coverage is below 100% | ||
20 | 23 | ||
21 | == v0.11.3 - 01/04/2016 | 24 | == v0.11.3 - 01/04/2016 |
22 | 25 |
features/support/header.rb
@@ -10,6 +10,9 @@ module HeaderUtils | @@ -10,6 +10,9 @@ module HeaderUtils | ||
10 | end | 10 | end |
11 | 11 | ||
12 | def set_headers(headers) | 12 | def set_headers(headers) |
13 | - headers.each(&method(:set_header)) | 13 | + # The call 'headers.each(&method(:set_header))' breaks on ruby 2.0.0-p598, which is the |
14 | + # default version on CentOS 7. When that SO updates ruby, this should be reverted to | ||
15 | + # the more concise syntax. | ||
16 | + headers.each { |key, value| method(:set_header).call(key, value) } | ||
14 | end | 17 | end |
15 | end | 18 | end |
spec/rails_helper.rb
@@ -3,17 +3,15 @@ require "codeclimate-test-reporter" | @@ -3,17 +3,15 @@ require "codeclimate-test-reporter" | ||
3 | CodeClimate::TestReporter.start | 3 | CodeClimate::TestReporter.start |
4 | require 'simplecov' | 4 | require 'simplecov' |
5 | 5 | ||
6 | -SimpleCov.start do | 6 | +SimpleCov.start 'rails' do |
7 | + # Minimum coverage is only desired on CI tools when building the environment. CI is a | ||
8 | + # default environment variable used by Travis. For reference, see here: | ||
9 | + # https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables | ||
10 | + minimum_coverage 100 if ENV["CI"] == 'true' | ||
7 | coverage_dir 'coverage/rspec' | 11 | coverage_dir 'coverage/rspec' |
8 | 12 | ||
9 | - add_group "Models", "app/models" | ||
10 | - add_group "Controllers", "app/controllers" | ||
11 | - add_group "Helpers", "app/helpers" | ||
12 | - add_group "Mailers", "app/mailers" | ||
13 | - | ||
14 | add_filter "/spec/" | 13 | add_filter "/spec/" |
15 | add_filter "/features/" | 14 | add_filter "/features/" |
16 | - add_filter "/config/" | ||
17 | end | 15 | end |
18 | 16 | ||
19 | # This file is copied to spec/ when you run 'rails generate rspec:install' | 17 | # This file is copied to spec/ when you run 'rails generate rspec:install' |
@@ -61,4 +59,4 @@ RSpec.configure do |config| | @@ -61,4 +59,4 @@ RSpec.configure do |config| | ||
61 | 59 | ||
62 | # Devise helpers | 60 | # Devise helpers |
63 | config.include Devise::TestHelpers, :type => :controller | 61 | config.include Devise::TestHelpers, :type => :controller |
64 | -end | ||
65 | \ No newline at end of file | 62 | \ No newline at end of file |
63 | +end |