Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Ruby < 3 versions from CircleCI config #53

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading