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

Travis configuration #2

Merged
merged 4 commits into from
Jun 6, 2019
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
29 changes: 24 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
---
sudo: false
language: ruby
rvm: 2.4.2
cache: bundler
rvm:
- 2.4.2
before_install: gem install bundler -v 1.17.3

# Travis CI clones repositories to a depth of 50 commits, which is only really
# useful if you are performing git operations.
# https://docs.travis-ci.com/user/customizing-the-build/#git-clone-depth
git:
depth: 3

before_script:
# Setup to support the CodeClimate test coverage submission
# As per CodeClimate's documentation, they suggest only running
# ./cc-test-reporter commands on travis-ci push builds only. Hence we wrap all
# the codeclimate test coverage related commands in a check that tests if we
# are in a pull request or not.
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; fi
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then chmod +x ./cc-test-reporter; fi
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter before-build; fi
# Run rubocop. It's installed as a dependency (hence no install step) as this
# allows projects to control the version they are using (rather than getting)
# surprise build failures.
# - bundle exec rubocop

after_script:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
1 change: 0 additions & 1 deletion defra_ruby_aws.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Gem::Specification.new do |spec|
spec.test_files = Dir["spec/**/*"]
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.17"

spec.add_development_dependency "defra_ruby_style"
# Shim to load environment variables from a .env file into ENV
Expand Down