Skip to content

Commit

Permalink
feat: add .circleci/config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
LucDelmon committed Sep 15, 2022
1 parent 10d9481 commit 5b0b042
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
version: 2.1

orbs:
ruby: circleci/[email protected]

executors:
ruby:
docker:
- image: cimg/ruby:3.0.0
environment:
RAILS_ENV: test
ruby_and_postgres:
docker:
- image: cimg/ruby:3.0.0
environment:
RAILS_ENV: test
DATABASE_HOST: localhost
- image: cimg/postgres:14.4
environment:
POSTGRES_USER: postgres
POSTGRES_HOST_AUTH_METHOD: trust

jobs:
build:
executor: ruby
steps:
- checkout
- ruby/install-deps:
key: gems-{{ checksum "Gemfile.lock" }}
- persist_to_workspace:
root: .
paths: .
tests:
parallelism: 4
executor: ruby_and_postgres
steps:
- attach_workspace:
at: .
- run: bundle exec rails db:setup
- ruby/rspec-test
static_analysis:
parallelism: 4
executor: ruby
steps:
- attach_workspace:
at: .
- ruby/rubocop-check:
parallel: true
- run: bundle exec brakeman -z
- run: gem install bundle-audit
- run: bundle-audit update
- run: bundle-audit

workflows:
version: 2
ci_workflow:
jobs:
- build
- tests:
requires:
- build
- static_analysis:
requires:
- build

0 comments on commit 5b0b042

Please sign in to comment.