From 034ef8309e4ed8714902c1c21b72bf22268f8ecd Mon Sep 17 00:00:00 2001 From: Elysa Ward <116769731+elysableu@users.noreply.github.com> Date: Thu, 22 May 2025 11:15:32 -0600 Subject: [PATCH 1/2] CircleCI Commit --- .circleci/config.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..17fb070 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,41 @@ +# This config was automatically generated from your source code +# Stacks detected: deps:ruby:. +version: 2.1 +orbs: + ruby: circleci/ruby@2.0.1 +jobs: + test-ruby: + # Install gems, run rspec tests + docker: + - image: cimg/ruby:3.2.2-node + - image: circleci/postgres:9.5-alpine + environment: + RAILS_ENV: test + steps: + - checkout + - ruby/install-deps + - run: + name: wait for DB + command: dockerize -wait tcp://localhost:5432 -timeout 1m + - run: + name: Database setup + command: bundle exec rake db:test:prepare + - run: + name: rspec test + command: bundle exec rspec + deploy: + # This is an example deploy job, not actually used by the workflow + docker: + - image: cimg/base:stable + steps: + # Replace this with steps to deploy to users + - run: + name: deploy + command: '#e.g. ./deploy.sh' +workflows: + build-and-test: + jobs: + - test-ruby + # - deploy: + # requires: + # - test-ruby From 105a01f781b9dd85876149a7a6296715fa4d5290 Mon Sep 17 00:00:00 2001 From: Elysa Ward <116769731+elysableu@users.noreply.github.com> Date: Thu, 22 May 2025 11:20:52 -0600 Subject: [PATCH 2/2] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 17fb070..76e4686 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: command: dockerize -wait tcp://localhost:5432 -timeout 1m - run: name: Database setup - command: bundle exec rake db:test:prepare + command: bin/rails db:{create,migrate} --trace - run: name: rspec test command: bundle exec rspec