Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update config
  • Loading branch information
Eclairemoy committed Apr 1, 2025
commit 8f48a6d1e9383a174e383de1786a1872dd211aa2
72 changes: 45 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,53 @@
version: 2
jobs:
"Test against Ruby 2.4":
docker:
- image: circleci/ruby:2.4.9
working_directory: ~/intercom-ruby
steps:
- checkout
- run: bundle install
- run: bundle exec rake
"Test against Ruby 2.5":
docker:
- image: circleci/ruby:2.5.7
working_directory: ~/intercom-ruby
steps:
- checkout
- run: bundle install
- run: bundle exec rake
"Test against Ruby 2.6":
version: 2.1

executors:
ruby-executor:
parameters:
ruby_version:
type: string
docker:
- image: circleci/ruby:2.6.5
- image: cimg/ruby:<< parameters.ruby_version >>
working_directory: ~/intercom-ruby

jobs:
test:
parameters:
ruby_version:
type: string
executor:
name: ruby-executor
ruby_version: << parameters.ruby_version >>
steps:
- checkout
- run: bundle install
- run: bundle exec rake

- restore_cache:
keys:
- bundler-<< parameters.ruby_version >>-{{ checksum "Gemfile.lock" }}

- run:
name: Install dependencies
command: |
gem install bundler
bundle install --jobs=4 --retry=3

- save_cache:
key: bundler-<< parameters.ruby_version >>-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle

- run:
name: Run tests
command: bundle exec rake

workflows:
version: 2
build_and_test:
jobs:
- "Test against Ruby 2.4"
- "Test against Ruby 2.5"
- "Test against Ruby 2.6"

- test:
name: "Test against Ruby 2.4"
ruby_version: "2.4"
- test:
name: "Test against Ruby 2.5"
ruby_version: "2.5"
- test:
name: "Test against Ruby 2.6"
ruby_version: "2.6"