version: 2.1 executors: ruby: parameters: version: type: string docker: - image: cimg/ruby:<< parameters.version >>-node jobs: test: parameters: ruby: type: string executor: name: ruby version: << parameters.ruby >> steps: - checkout - run: name: install dependencies command: | bundle install --jobs=4 --retry=3 yarn install - run: cd spec/dummy; RAILS_ENV=test bundle exec rake db:setup - run: name: run tests command: | mkdir /tmp/test-results TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)" bundle exec rspec --format progress \ --format RspecJunitFormatter \ --out /tmp/test-results/rspec.xml \ --format documentation \ --order rand \ $TEST_FILES - store_test_results: path: /tmp/test-results - store_artifacts: path: /tmp/test-results destination: test-results # Lint - run: yarn lint - run: yarn build workflows: build: jobs: - test: name: test_ruby-2.5 ruby: 2.5.9 - test: name: test_ruby-2.7 ruby: 2.7.8 - test: name: test_ruby-3.0 ruby: 3.0.7 - test: name: test_ruby-3.3 ruby: 3.3.1