Skip to content

Commit

Permalink
Merge pull request #57 from gocardless/circle2
Browse files Browse the repository at this point in the history
Migrate to CircleCI 2.0, add Ruby 2.6 support, update Rubocop
  • Loading branch information
Nick Campbell authored May 24, 2019
2 parents 1e99343 + d0babe3 commit 1c80e97
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 23 deletions.
50 changes: 43 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,46 @@
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.5.1
steps:

references:
steps: &steps
- checkout
- run: bundle install

- type: cache-restore
key: companies-house-rest-bundler-{{ checksum "companies-house-rest.gemspec" }}

- run: gem install bundler -v 1.17

- run: bundle install --path vendor/bundle

- type: cache-save
key: companies-house-rest-bundler-{{ checksum "companies-house-rest.gemspec" }}
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
- run: bundle exec rspec
jobs:
build-ruby25:
docker:
- image: ruby:2.5
steps: *steps
build-ruby26:
docker:
- image: ruby:2.6
steps: *steps

workflows:
version: 2
tests:
jobs:
- build-ruby25
- build-ruby26
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
inherit_gem:
gc_ruboconfig: rubocop.yml

AllCops:
TargetRubyVersion: 2.5

Metrics/MethodLength:
Max: 15

Expand Down
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

12 changes: 0 additions & 12 deletions circle.yml

This file was deleted.

6 changes: 3 additions & 3 deletions companies-house-rest.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.required_ruby_version = ">= 2.5.1"
spec.required_ruby_version = ">= 2.5.5"

spec.add_runtime_dependency "activesupport", ">= 4.2", "< 6"
spec.add_runtime_dependency "virtus", "~> 1.0", ">= 1.0.5"

spec.add_development_dependency "bundler", "~> 1.10"
spec.add_development_dependency "gc_ruboconfig", "~> 2.3"
spec.add_development_dependency "gc_ruboconfig", "~> 2.4"
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "rspec", "~> 3.5"
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.1"
spec.add_development_dependency "timecop", "~> 0.8"
spec.add_development_dependency "webmock", "~> 3.0"
end

0 comments on commit 1c80e97

Please sign in to comment.