Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update travis yml #353

Merged
merged 8 commits into from
May 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,49 @@
language: ruby
rvm:
- 2.3.0
- 2.0.0-p598 # CentOS 7
- 2.1.5 # Debian 8

addons:
postgresql: "9.3"

before_install:
- if ruby --version | cut -d ' ' -f 2 | grep -q 2.1.5p273 ; then gem update --system 2.4.8; fi

before_script:
- git clone https://github.com/mezuro/kalibro_install.git -b v4.0 kalibro_install
- git clone https://github.com/mezuro/kalibro_install.git -b v4.2 kalibro_install
- export KALIBRO_CONFIGURATIONS_START=0
- export KALIBRO_PROCESSOR_START=0
- pushd kalibro_install
# 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
#
# 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
#
# In 2016/04/27 the state is:
# * The first issue has been closed and apparently fixed by a PR
# * The second one has been closed without a PR and removing the workaround below breaks the build
#
- sudo apt-get remove libzmq3
- export KALIBRO_PROCESSOR_VERSION=v1.2.1
- export KALIBRO_CONFIGURATIONS_VERSION=v2.0.0
- bash install.sh
- popd
- cp config/database.yml.sample config/database.yml
- bundle exec rake db:setup
# Do not run setup as the Kalibro services are up and this is not even necessary!
- bundle exec rake db:create
- bundle exec rake db:migrate
- cp features/support/kalibro_cucumber_helpers.yml.sample features/support/kalibro_cucumber_helpers.yml
- export BUNDLE_GEMFILE=$PWD/Gemfile
- export CODECLIMATE_REPO_TOKEN=045c2433d496f108c0c6afa5516a72ddbfb1868fb34bf7a9bd095b7a0ea34a79

script:
# Unit tests
- bundle exec rake spec
- bundle exec rake konacha:run
#
# Start kalibro for acceptance tests
- pushd kalibro_install
- bash start_kalibro_services.sh
- popd
#
# Acceptance tests
- bundle exec rake cucumber

notifications:
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ Prezento is the web interface for Mezuro.
* Pluralize navigation menu links
* Add missing translation for CompoundMetric
* Make Compound Metric Config. metric list not include Hotspot metrics
* Fix 'Tree Metrics' and 'Hotspot Metrics' PT translations in Configuration show view
* Fix 'Tree Metrics' and 'Hotspot Metrics' PT translations in Configuration show view
* Show the notify push url for the repository's owner (Gitlab only)
* Support for hiding repositories
* Fix home latest content caching effectiveness
* Update travis script
* Support for ruby 2.0.0-p598 (CentOS 7 default) and 2.1.5 (Debian 8 default)
* Make Travis fail if minimun unit test coverage is below 100%

== v0.11.3 - 01/04/2016

Expand Down
5 changes: 4 additions & 1 deletion features/support/header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ def set_header(key, value)
end

def set_headers(headers)
headers.each(&method(:set_header))
# The call 'headers.each(&method(:set_header))' breaks on ruby 2.0.0-p598, which is the
# default version on CentOS 7. When that SO updates ruby, this should be reverted to
# the more concise syntax.
headers.each { |key, value| method(:set_header).call(key, value) }
end
end
14 changes: 6 additions & 8 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
CodeClimate::TestReporter.start
require 'simplecov'

SimpleCov.start do
SimpleCov.start 'rails' do
# Minimum coverage is only desired on CI tools when building the environment. CI is a
# default environment variable used by Travis. For reference, see here:
# https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
minimum_coverage 100 if ENV["CI"] == 'true'
coverage_dir 'coverage/rspec'

add_group "Models", "app/models"
add_group "Controllers", "app/controllers"
add_group "Helpers", "app/helpers"
add_group "Mailers", "app/mailers"

add_filter "/spec/"
add_filter "/features/"
add_filter "/config/"
end

# This file is copied to spec/ when you run 'rails generate rspec:install'
Expand Down Expand Up @@ -61,4 +59,4 @@

# Devise helpers
config.include Devise::TestHelpers, :type => :controller
end
end