Skip to content

Commit

Permalink
Updated config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipkamps committed Jul 9, 2022
1 parent 836d89d commit 5ee8e1e
Showing 1 changed file with 49 additions and 7 deletions.
56 changes: 49 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,68 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

orbs:
ruby: circleci/[email protected]
node: circleci/node@2
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
say-hello:
build:
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
docker:
- image: cimg/base:stable
- image: cimg/ruby:2.7.2-node
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD
# Add steps to the job
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
steps:
- checkout
- ruby/install-deps

test:
parallelism: 3
docker:
- image: cimg/ruby:2.7.2-node
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD
- image: circleci/postgres:9.5-alpine
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD
environment:
POSTGRES_USER: circleci-demo-ruby
POSTGRES_DB: rails_blog_test
POSTGRES_PASSWORD: ""
environment:
BUNDLE_JOBS: "3"
BUNGLE_RETRY: "3"
PGHOST: 127.0.0.1
PGUSER: circleci-demo-ruby
PGPASSWORD: ""
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:{create,migrate}
- run:
name: "Say hello"
command: "echo Hello, World!"
name: run tests
command: bundle exec rspec

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
say-hello-workflow:
build-and-test:
jobs:
- say-hello
- build
- test:
requires:
- build

0 comments on commit 5ee8e1e

Please sign in to comment.