.circleci/config.yml in knapsack_pro-6.0.4 vs .circleci/config.yml in knapsack_pro-7.0.0
- old
+ new
@@ -35,39 +35,83 @@
sed -i 's/.*gem.*rspec-core.*/gem "rspec-core", "<< parameters.rspec >>"/g' ./Gemfile
echo "Updated RSpec version in Gemfile"
fi
- restore_cache:
keys:
- - v1-bundler-rails-{{ checksum "Gemfile.lock" }}-<< parameters.ruby >>
+ - v1-bundler-rails-{{ checksum "Gemfile.lock" }}-ruby-<< parameters.ruby >>-rspec-<< parameters.rspec >>
+ - v1-bundler-rails-{{ checksum "Gemfile.lock" }}-ruby-<< parameters.ruby >>-
- v1-bundler-rails-{{ checksum "Gemfile.lock" }}-
- v1-bundler-rails-
- run:
working_directory: << parameters.path >>
command: |
bundle config set --local path './vendor/bundle'
bundle install --jobs=4 --retry=3
- save_cache:
paths:
- << parameters.path >>/vendor/bundle
- key: v1-bundler-rails-{{ checksum "Gemfile.lock" }}-<< parameters.ruby >>
+ key: v1-bundler-rails-{{ checksum "Gemfile.lock" }}-ruby-<< parameters.ruby >>-rspec-<< parameters.rspec >>
jobs:
unit:
parallelism: 1
working_directory: ~/knapsack_pro-ruby
+ resource_class: small
docker:
- - image: cimg/ruby:3.2
+ - image: cimg/ruby:3.3
steps:
- setup_knapsack_pro_ruby
- run: gem install rubocop
- run: rubocop --fail-level A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment lib/
- run: bundle exec rspec spec
- run: bundle exec ruby spec/knapsack_pro/formatters/time_tracker_specs.rb
- integration-regular-rspec:
+ integration-rspec:
+ parallelism: 1
+ working_directory: ~/knapsack_pro-ruby
+ resource_class: small
+ parameters:
+ ruby:
+ type: string
+ rspec:
+ type: string
+ docker:
+ - image: cimg/ruby:<< parameters.ruby >>
+ steps:
+ - checkout
+ - run:
+ command: |
+ if [[ "<< parameters.rspec >>" != "" ]]; then
+ sed -i 's/.*gem.*rspec-core.*/gem "rspec-core", "<< parameters.rspec >>"/g' ./Gemfile
+ echo "Updated RSpec version in Gemfile"
+ fi
+ - restore_cache:
+ keys:
+ - v1-bundler-gem-{{ checksum "knapsack_pro.gemspec" }}-ruby-<< parameters.ruby >>-rspec-<< parameters.rspec >>
+ - v1-bundler-gem-{{ checksum "knapsack_pro.gemspec" }}-ruby-<< parameters.ruby >>-
+ - v1-bundler-gem-{{ checksum "knapsack_pro.gemspec" }}-
+ - v1-bundler-gem-
+ - run:
+ command: |
+ bundle config set --local path './vendor/bundle'
+ bundle install --jobs=4 --retry=3
+ - save_cache:
+ paths:
+ - ./vendor/bundle
+ key: v1-bundler-gem-{{ checksum "knapsack_pro.gemspec" }}-ruby-<< parameters.ruby >>-rspec-<< parameters.rspec >>
+ - run:
+ command: |
+ ruby --version
+ bundle exec rspec --version
+ RSPEC=$(bundle exec rspec --version | grep rspec-core | head -n1 | cut -d " " -f5)
+ [ $RSPEC != << parameters.rspec >> ] && exit 1 || echo "Correct version of RSpec installed: $RSPEC"
+ - run: bundle exec rspec spec/integration/runners/queue/rspec_runner_spec.rb
+
+ e2e-regular-rspec:
parallelism: 2
working_directory: ~/knapsack_pro-ruby
+ resource_class: small
parameters:
ruby:
type: string
rspec:
type: string
@@ -120,19 +164,28 @@
command: |
# split by test examples ||
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular--split"
export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
bundle exec rake knapsack_pro:rspec
+ - run:
+ working_directory: ~/rails-app-with-knapsack_pro
+ command: |
+ # split custom files by test examples ||
+ export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular--split-custom-files"
+ export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
+ export KNAPSACK_PRO_SLOW_TEST_FILE_PATTERN="spec/features/calculator_spec.rb"
+ bundle exec rake knapsack_pro:rspec
- integration-queue-rspec:
+ e2e-queue-rspec:
parameters:
ruby:
type: string
rspec:
type: string
parallelism: 2
working_directory: ~/knapsack_pro-ruby
+ resource_class: small
docker:
- image: cimg/ruby:<< parameters.ruby >>-browsers
environment:
PGHOST: 127.0.0.1
PGUSER: rails-app-with-knapsack_pro
@@ -214,13 +267,14 @@
export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
export KNAPSACK_PRO_TEST_DIR=turnip
export KNAPSACK_PRO_TEST_FILE_PATTERN="turnip/**/*.feature"
bundle exec rake "knapsack_pro:queue:rspec[-r turnip/rspec]"
- integration-regular-minitest:
+ e2e-regular-minitest:
parallelism: 2
working_directory: ~/knapsack_pro-ruby
+ resource_class: small
parameters:
ruby:
type: string
docker:
- image: cimg/ruby:<< parameters.ruby >>-browsers
@@ -253,16 +307,17 @@
working_directory: ~/rails-app-with-knapsack_pro
command: |
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular"
bundle exec rake knapsack_pro:minitest[--verbose]
- integration-queue-minitest:
+ e2e-queue-minitest:
parameters:
ruby:
type: string
parallelism: 2
working_directory: ~/knapsack_pro-ruby
+ resource_class: small
docker:
- image: cimg/ruby:<< parameters.ruby >>-browsers
environment:
PGHOST: 127.0.0.1
PGUSER: rails-app-with-knapsack_pro
@@ -305,27 +360,33 @@
workflows:
tests:
jobs:
- unit
- - integration-regular-rspec:
- name: integration-regular__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
+ - integration-rspec:
+ name: integration__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
matrix:
parameters:
- ruby: ["3.0", "3.1", "3.2"]
+ ruby: ["3.0", "3.1", "3.2", "3.3"]
rspec: ["3.10.2", "3.11.0", "3.12.2"]
- - integration-queue-rspec:
- name: integration-queue__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
+ - e2e-regular-rspec:
+ name: e2e-regular__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
matrix:
parameters:
- ruby: ["3.0", "3.1", "3.2"]
+ ruby: ["3.0", "3.1", "3.2", "3.3"]
rspec: ["3.10.2", "3.11.0", "3.12.2"]
- - integration-regular-minitest:
- name: integration-regular__ruby-<< matrix.ruby >>__minitest
+ - e2e-queue-rspec:
+ name: e2e-queue__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
matrix:
parameters:
- ruby: ["3.0", "3.1", "3.2"]
- - integration-queue-minitest:
- name: integration-queue__ruby-<< matrix.ruby >>__minitest
+ ruby: ["3.0", "3.1", "3.2", "3.3"]
+ rspec: ["3.10.2", "3.11.0", "3.12.2"]
+ - e2e-regular-minitest:
+ name: e2e-regular__ruby-<< matrix.ruby >>__minitest
matrix:
parameters:
- ruby: ["3.0", "3.1", "3.2"]
+ ruby: ["3.0", "3.1", "3.2", "3.3"]
+ - e2e-queue-minitest:
+ name: e2e-queue__ruby-<< matrix.ruby >>__minitest
+ matrix:
+ parameters:
+ ruby: ["3.0", "3.1", "3.2", "3.3"]