Skip to content

Commit

Permalink
Merge pull request #34 from veracross/update-ci-config-for-multiple-r…
Browse files Browse the repository at this point in the history
…uby-versions

Update CI config to test multiple ruby versions
  • Loading branch information
aharpervc authored Mar 9, 2021
2 parents 4cd74b7 + 7e65da4 commit 478b548
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
version: 2
version: 2.1

jobs:
build:
test:
parameters:
ruby_version:
type: string

docker:
- image: circleci/ruby:2.5.3
- image: circleci/ruby:<< parameters.ruby_version >>
- image: consul:1.3.0
- image: vault:0.11.3
environment:
Expand All @@ -19,9 +24,9 @@ jobs:
- restore_cache:
name: restore gem cache
keys:
- v1-bundle-{{ .Branch }}-{{ checksum "consult.gemspec" }}
- v1-bundle-{{ .Branch }}-
- v1-bundle-
- v1-bundle-<< parameters.ruby_version >>-{{ .Branch }}-{{ checksum "consult.gemspec" }}
- v1-bundle-<< parameters.ruby_version >>-{{ .Branch }}-
- v1-bundle-<< parameters.ruby_version >>-

- run:
name: install dependencies
Expand All @@ -33,7 +38,7 @@ jobs:
name: save gem cache
paths:
- ./vendor/bundle
key: v1-bundle-{{ .Branch }}-{{ checksum "consult.gemspec" }}
key: v1-bundle-<< parameters.ruby_version >>-{{ .Branch }}-{{ checksum "consult.gemspec" }}

- run:
name: setup fixture data
Expand All @@ -59,5 +64,15 @@ jobs:
path: /tmp/test-results

- store_artifacts:
path: /tmp/test-results
destination: test-results
path: ./coverage
destination: coverage

workflows:
test_supported_ruby_versions:
jobs:
- test:
matrix:
parameters:
ruby_version:
- '2.5'
- '2.7'

0 comments on commit 478b548

Please sign in to comment.