forked from comorebi-notes/rechord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
62 lines (55 loc) · 1.49 KB
/
circle.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
58
59
60
61
62
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.5.1-node
environment:
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
BUNDLE_PATH: vendor/bundle
PGHOST: 127.0.0.1
PGUSER: rechord
RAILS_ENV: test
- image: circleci/postgres:9.5-alpine
environment:
POSTGRES_USER: rechord
POSTGRES_DB: rechord_test
POSTGRES_PASSWORD: ""
working_directory: ~/rechord
steps:
- checkout
# bundle
- run:
name: Which bundler?
command: bundle -v
- restore_cache:
keys:
- rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
- rails-demo-bundle-v2-
- run:
name: Bundle Install
command: bundle check || bundle install
- save_cache:
key: rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
# yarn
- restore_cache:
keys:
- rails-demo-yarn-{{ checksum "yarn.lock" }}
- rails-demo-yarn-
- run:
name: yarn install
command: curl -o- -L https://yarnpkg.com/install.sh; yarn install
- save_cache:
key: rails-demo-yarn-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
# database
- run:
name: Database setup
command: bin/rails db:schema:load --trace
# test
- run:
name: check lint
command: yarn lint