-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This switches from running the CI pipeline for Coach in CircleCI, which we generally use across GoCardless, rather than TravisCI. The configured workflow will test the project on Ruby 2.3, 2.4 and 2.5 using Rails versions 4.2.10 and 5.1.5. As part of this process, we: * Start testing against Ruby 2.5.x, which we weren't doing before * Move to the most recent versions of Rails in 4.x and 5.x, rather than slightly out of date versions * Add `rspec_junit_formatter` to the gem's development dependencies to get nicely-formatted test results in Circle
- Loading branch information
Tim Rogers
committed
Mar 6, 2018
1 parent
565c621
commit b1270d1
Showing
3 changed files
with
97 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
version: 2 | ||
|
||
references: | ||
steps: &steps | ||
- checkout | ||
|
||
- type: shell | ||
name: Write RAILS_VERSION to a file so we can use it for caching purposes | ||
command: echo "$RAILS_VERSION" > ~/RAILS_VERSION.txt | ||
|
||
- type: cache-restore | ||
key: coach-bundler-{{ checksum "coach.gemspec" }}-{{ checksum "~/RAILS_VERSION.txt" }} | ||
|
||
- run: gem install bundler | ||
|
||
- run: bundle install --path vendor/bundle | ||
|
||
- type: cache-save | ||
key: coach-bundler-{{ checksum "coach.gemspec" }}-{{ checksum "~/RAILS_VERSION.txt" }} | ||
paths: | ||
- vendor/bundle | ||
|
||
- type: shell | ||
command: | | ||
bundle exec rspec --profile 10 \ | ||
--format RspecJunitFormatter \ | ||
--out /tmp/test-results/rspec.xml \ | ||
--format progress \ | ||
spec | ||
- type: store_test_results | ||
path: /tmp/test-results | ||
|
||
- run: bundle exec rubocop | ||
jobs: | ||
build-ruby22-rails515: | ||
docker: | ||
- image: ruby:2.2 | ||
environment: | ||
- RAILS_VERSION=5.1.5 | ||
steps: *steps | ||
build-ruby22-rails4210: | ||
docker: | ||
- image: ruby:2.2 | ||
environment: | ||
- RAILS_VERSION=4.2.10 | ||
steps: *steps | ||
build-ruby23-rails515: | ||
docker: | ||
- image: ruby:2.3 | ||
environment: | ||
- RAILS_VERSION=5.1.5 | ||
steps: *steps | ||
build-ruby23-rails4210: | ||
docker: | ||
- image: ruby:2.3 | ||
environment: | ||
- RAILS_VERSION=4.2.10 | ||
steps: *steps | ||
build-ruby24-rails515: | ||
docker: | ||
- image: ruby:2.4 | ||
environment: | ||
- RAILS_VERSION=5.1.5 | ||
steps: *steps | ||
build-ruby24-rails4210: | ||
docker: | ||
- image: ruby:2.4 | ||
environment: | ||
- RAILS_VERSION=4.2.10 | ||
steps: *steps | ||
build-ruby25-rails515: | ||
docker: | ||
- image: ruby:2.5 | ||
environment: | ||
- RAILS_VERSION=5.1.5 | ||
steps: *steps | ||
build-ruby25-rails4210: | ||
docker: | ||
- image: ruby:2.5 | ||
environment: | ||
- RAILS_VERSION=4.2.10 | ||
steps: *steps | ||
|
||
workflows: | ||
version: 2 | ||
tests: | ||
jobs: | ||
- build-ruby22-rails515 | ||
- build-ruby22-rails4210 | ||
- build-ruby23-rails515 | ||
- build-ruby23-rails4210 | ||
- build-ruby24-rails515 | ||
- build-ruby24-rails4210 | ||
- build-ruby25-rails515 | ||
- build-ruby25-rails4210 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters