kibitan/masking

View on GitHub
.circleci/config.yml

Summary

Maintainability
Test Coverage
version: 2.1

test_attributes: &test_attributes
  docker:
    - image: cimg/base:current
  resource_class: small
  steps:
    - checkout
    - setup_remote_docker
    - run:
        name: build docker image
        command: docker build -t masking-$RUBY_VERSION-$CIRCLE_SHA1 --build-arg ruby_version=$RUBY_VERSION .
    - run:
        name: output Ruby version (debug)
        command: docker run --entrypoint sh masking-$RUBY_VERSION-$CIRCLE_SHA1 -c "ruby -v" # debug
    - run:
        name: run test & rubocop & notes
        command: docker run --entrypoint sh -e CI -e CODECOV_TOKEN masking-$RUBY_VERSION-$CIRCLE_SHA1 -c "bundle exec rake"

jobs:
  test-ruby33:
    <<: *test_attributes
    environment:
      RUBY_VERSION: '3.3'
  test-ruby32:
    <<: *test_attributes
    environment:
      RUBY_VERSION: '3.2'
  test-ruby31:
    <<: *test_attributes
    environment:
      RUBY_VERSION: '3.1'
  test-ruby30:
    <<: *test_attributes
    environment:
      RUBY_VERSION: '3.0'
  test-ruby27:
    <<: *test_attributes
    environment:
      RUBY_VERSION: '2.7'
  test-ruby26:
    <<: *test_attributes
    environment:
      RUBY_VERSION: '2.6'

workflows:
  'CircleCI: build':
    jobs:
      - test-ruby33
      - test-ruby32
      - test-ruby31
      - test-ruby30
      - test-ruby26
      - test-ruby27