-
Notifications
You must be signed in to change notification settings - Fork 293
/
config.yml
executable file
·57 lines (54 loc) · 1.25 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: 2.1
orbs:
ruby: circleci/ruby@1.1.0
node: circleci/node@2
jobs:
build:
docker:
- image: cimg/ruby:2.7-node
steps:
- checkout
- ruby/install-deps
# Store bundle cache
- node/install-packages:
pkg-manager: yarn
cache-key: "yarn.lock"
test:
parallelism: 3
docker:
- image: cimg/ruby:2.7-node
- image: circleci/postgres:9.5-alpine
environment:
POSTGRES_USER: circleci-demo-ruby
POSTGRES_DB: rails_blog_test
POSTGRES_PASSWORD: ""
environment:
BUNDLE_JOBS: "3"
BUNDLE_RETRY: "3"
PGHOST: 127.0.0.1
PGUSER: circleci-demo-ruby
PGPASSWORD: ""
RAILS_ENV: test
steps:
- checkout
- ruby/install-deps
- node/install-packages:
pkg-manager: yarn
cache-key: "yarn.lock"
- run:
name: Wait for DB
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: Database setup
command: bundle exec rails db:schema:load --trace
# Run rspec in parallel
- ruby/rspec-test
- ruby/rubocop-check
workflows:
version: 2
build_and_test:
jobs:
- build
- test:
requires:
- build