Skip to content

Commit

Permalink
Ruby 3.2.4, simplify circle config
Browse files Browse the repository at this point in the history
  • Loading branch information
danivovich committed Jul 30, 2024
1 parent 35fbe74 commit d7e72b8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 73 deletions.
75 changes: 10 additions & 65 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,12 @@ orbs:

executors:
test_executor:
parameters:
ruby_version:
type: string
postgres_version:
type: string

working_directory: ~/Challenge_platform

docker:
- image: cimg/ruby:<< parameters.ruby_version >>
- image: cimg/ruby:3.2.4
environment:
RAILS_ENV: test
- image: cimg/postgres:<< parameters.postgres_version >>
- image: cimg/postgres:16.3
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand All @@ -34,16 +27,8 @@ commands:

jobs:
checkout_code:
parameters:
ruby_version:
type: string
postgres_version:
type: string

executor:
executor:
name: test_executor
ruby_version: << parameters.ruby_version >>
postgres_version: << parameters.postgres_version >>

steps:
- checkout
Expand All @@ -60,16 +45,8 @@ jobs:
- ~/Challenge_platform

rspec:
parameters:
ruby_version:
type: string
postgres_version:
type: string

executor:
executor:
name: test_executor
ruby_version: << parameters.ruby_version >>
postgres_version: << parameters.postgres_version >>

parallelism: 1

Expand All @@ -78,7 +55,7 @@ jobs:
key: repo-{{ .Environment.CIRCLE_SHA1 }}

- ruby/install-deps:
key: gems-ruby-<< parameters.ruby_version >>-v{{ .Environment.CACHE_VERSION }}
key: gems-ruby-3.2.4-v{{ .Environment.CACHE_VERSION }}

- prepare_database

Expand All @@ -96,7 +73,7 @@ jobs:
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
./cc-test-reporter format-coverage \
--output coverage/codeclimate.rspec.$CIRCLE_NODE_INDEX.<< parameters.ruby_version >>.json
--output coverage/codeclimate.rspec.$CIRCLE_NODE_INDEX.3.2.4.json
- persist_to_workspace:
root: ~/Challenge_platform/coverage
Expand All @@ -112,16 +89,8 @@ jobs:
destination: test-results

report_coverage:
parameters:
ruby_version:
type: string
postgres_version:
type: string

executor:
executor:
name: test_executor
ruby_version: << parameters.ruby_version >>
postgres_version: << parameters.postgres_version >>

steps:
- restore_cache:
Expand All @@ -142,7 +111,7 @@ jobs:
dev-deploy:
parallelism: 1
docker:
- image: cimg/ruby:3.2.2
- image: cimg/ruby:3.2.4
steps:
- checkout
- run: bundle cache --all
Expand Down Expand Up @@ -174,37 +143,13 @@ workflows:
version: 2
test-and-deploy:
jobs:
- checkout_code:
name: "checkout code: Ruby << matrix.ruby_version >>"
matrix:
parameters:
ruby_version:
- 3.2.2
postgres_version:
- "16.3"

- checkout_code
- rspec:
requires:
- checkout_code
name: "rspec: Ruby << matrix.ruby_version >>"
matrix:
parameters:
ruby_version:
- 3.2.2
postgres_version:
- "16.3"

- report_coverage:
requires:
- "rspec: Ruby << matrix.ruby_version >>"
name: "report coverage: Ruby << matrix.ruby_version >>"
matrix:
parameters:
ruby_version:
- 3.2.2
postgres_version:
- "16.3"

- rspec
- dev-deploy:
requires:
- rspec
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.2.2
ruby-3.2.4
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.2.2
ruby 3.2.4
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

ruby "3.2.2"
ruby "3.2.4"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.1.3", ">= 7.1.3.4"
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ DEPENDENCIES
web-console

RUBY VERSION
ruby 3.2.2p53
ruby 3.2.4p170

BUNDLED WITH
2.4.13
2.5.16
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "challenge_platform",
"version": "1.0.0",
"private": true,
"engines": {
"node": ">=20"
},
"description": "Challenge.Gov is an open source platform that accepts contributions and feedback from our customers.",
"main": "index.js",
"directories": {
"lib": "lib",
"test": "test"
Expand Down
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
lib ? import <lib> {},
pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs/archive/refs/tags/23.05.zip) {}
pkgs ? import (fetchTarball channel:nixos-24.05) {}
}:

let
Expand All @@ -24,7 +24,7 @@ let

pkgs.ruby_3_2
pkgs.bundler
pkgs.nodejs_18
pkgs.nodejs_20
pkgs.yarn

# cloud foundry CLI
Expand Down

0 comments on commit d7e72b8

Please sign in to comment.