Skip to content

Commit

Permalink
Remove Ruby < 3 versions from CircleCI config
Browse files Browse the repository at this point in the history
  • Loading branch information
duknic committed Sep 30, 2024
1 parent ccf87a5 commit cbc970c
Showing 1 changed file with 2 additions and 51 deletions.
53 changes: 2 additions & 51 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,6 @@ version: 2.1

# executors are environments in which a job runs. Here we use docker contaners.
executors:
ruby-2-6:
docker:
- image: circleci/ruby:2.6.6-node-browsers
- image: circleci/postgres:10.6
environment:
- POSTGRES_USER=draft_approve_test
- POSTGRES_DB=draft_approve_test

ruby-2-7:
docker:
- image: circleci/ruby:2.7.2-node-browsers
- image: circleci/postgres:10.6
environment:
- POSTGRES_USER=draft_approve_test
- POSTGRES_DB=draft_approve_test

ruby-3-0:
docker:
- image: circleci/ruby:3.0.0-node-browsers
Expand All @@ -33,18 +17,12 @@ jobs:
# We can use YAML to define a part of a job we alias as 'build', and then include it in other jobs to keep things DRY
build-default: &build
parameters:
run-activerecord-5-2-x:
type: boolean
default: true
run-activerecord-6-0-x:
type: boolean
default: true
run-activerecord-6-1-x:
type: boolean
default: true

# Specify a default executor for the job
executor: ruby-2-6
executor: ruby-3-0
working_directory: ~/repo

steps:
Expand Down Expand Up @@ -84,20 +62,6 @@ jobs:
mkdir /tmp/test-results
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
- when:
condition: << parameters.run-activerecord-5-2-x >>
steps:
- run:
name: run activerecord-5.2.x tests
command: bundle exec appraisal activerecord-5-2-x rspec

- when:
condition: << parameters.run-activerecord-6-0-x >>
steps:
- run:
name: run activerecord-6.0.x tests
command: bundle exec appraisal activerecord-6-0-x rspec

- when:
condition: << parameters.run-activerecord-6-1-x >>
steps:
Expand All @@ -112,15 +76,6 @@ jobs:
path: /tmp/test-results
destination: test-results

# Specific build jobs for each ruby version
build-ruby-2-6:
<<: *build
executor: ruby-2-6

build-ruby-2-7:
<<: *build
executor: ruby-2-7

build-ruby-3-0:
<<: *build
executor: ruby-3-0
Expand All @@ -129,8 +84,4 @@ jobs:
workflows:
build_all_versions:
jobs:
- build-ruby-2-6
- build-ruby-2-7
- build-ruby-3-0:
# Rails/ActiveRecord earlier than 6.x is not compatible with ruby 3
run-activerecord-5-2-x: false
- build-ruby-3-0

0 comments on commit cbc970c

Please sign in to comment.