.circleci/config.yml in salsify_rubocop-1.0.2 vs .circleci/config.yml in salsify_rubocop-1.1.0
- old
+ new
@@ -1,34 +1,71 @@
-version: 2
+version: 2.1
jobs:
- build:
+ lint:
docker:
- - image: salsify/ruby_ci:2.5.8
- environment:
- CIRCLE_TEST_REPORTS: "test-results"
+ - image: salsify/ruby_ci:2.6.6
working_directory: ~/salsify_rubocop
steps:
- checkout
- restore_cache:
keys:
- - v1-gems-ruby-2.5.8-{{ checksum "salsify_rubocop.gemspec" }}-{{ checksum "Gemfile" }}
- - v1-gems-ruby-2.5.8-
+ - v1-gems-ruby-2.6.6-{{ checksum "salsify_rubocop.gemspec" }}-{{ checksum "Gemfile" }}
+ - v1-gems-ruby-2.6.6-
- run:
name: Install Gems
command: |
if ! bundle check --path=vendor/bundle; then
bundle install --path=vendor/bundle --jobs=4 --retry=3
bundle clean
fi
- save_cache:
- key: v1-gems-ruby-2.5.8-{{ checksum "salsify_rubocop.gemspec" }}-{{ checksum "Gemfile" }}
+ key: v1-gems-ruby-2.6.6-{{ checksum "salsify_rubocop.gemspec" }}-{{ checksum "Gemfile" }}
paths:
- "vendor/bundle"
+ - "gemfiles/vendor/bundle"
- run:
name: Run Rubocop
- command: bundle exec rubocop
+ command: bundle exec rubocop --config .rubocop.yml
+ test:
+ parameters:
+ ruby_version:
+ type: string
+ docker:
+ - image: salsify/ruby_ci:<< parameters.ruby_version >>
+ environment:
+ CIRCLE_TEST_REPORTS: "test-results"
+ working_directory: ~/salsify_rubocop
+ steps:
+ - checkout
+ - restore_cache:
+ keys:
+ - v1-gems-ruby-<< parameters.ruby_version >>-{{ checksum "salsify_rubocop.gemspec" }}-{{ checksum "Gemfile" }}
+ - v1-gems-ruby-<< parameters.ruby_version >>-
- run:
+ name: Install Gems
+ command: |
+ if ! bundle check --path=vendor/bundle; then
+ bundle install --path=vendor/bundle --jobs=4 --retry=3
+ bundle clean
+ fi
+ - save_cache:
+ key: v1-gems-ruby-<< parameters.ruby_version >>-{{ checksum "salsify_rubocop.gemspec" }}-{{ checksum "Gemfile" }}
+ paths:
+ - "vendor/bundle"
+ - "gemfiles/vendor/bundle"
+ - run:
name: Run Tests
command: |
bundle exec rspec --format RspecJunitFormatter --out $CIRCLE_TEST_REPORTS/rspec/junit.xml --format progress spec
- store_test_results:
path: "test-results"
+workflows:
+ build:
+ jobs:
+ - lint
+ - test:
+ matrix:
+ parameters:
+ ruby_version:
+ - "2.6.6"
+ - "2.7.2"
+ - "3.0.0"