.circleci/config.yml
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
orbs:
ruby: circleci/ruby@2.0.0
coveralls: coveralls/coveralls@2.1.0
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
test:
parameters:
ruby-version:
type: string
docker:
- image: cimg/ruby:<< parameters.ruby-version >>
resource_class: small
environment:
COVERAGE: Summary
steps:
- checkout
- run: bundle install
- run: bundle exec rake
- coveralls/upload:
coverage_file: coverage/lcov.info
compare_ref: main
parallel: true
flag_name: test-<< parameters.ruby-version >>
done:
docker:
- image: cimg/ruby:3.2
steps:
- coveralls/upload:
carryforward: 'test-3.2'
parallel_finished: true
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
buidle_and_test:
jobs:
- test:
matrix:
parameters:
# https://github.com/CircleCI-Public/cimg-ruby
# only supports the last three ruby versions
ruby-version: ["2.6", "2.7", "3.0", "3.2"]
- done:
requires:
- test