-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
65 lines (65 loc) · 1.88 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
63
64
65
version: 2.0
jobs:
build:
working_directory: ~/tenqmemo
docker:
- image: talktome/tenqmemo:latest
- image: redis:3.2.11-alpine
- image: postgres:9.6.2
environment:
POSTGRES_PASSWORD: ''
POSTGRES_USER: postgres
POSTGRES_DB: tenqmemo_test
environment:
NODE_ENV: development
RAILS_ENV: test
RACK_ENV: test
YARN_VERSION: 1.6.0
REDIS_URL: redis://127.0.0.1:6379/0
steps:
- checkout
- restore_cache:
keys:
- gemfile-2.5-{{ .Branch }}-
- gemfile-2.5-master
- restore_cache:
keys:
- npm-3.10-{{ .Branch }}-
- npm-3.10-master
- run:
name: bundle install
command: bundle install --path vendor/bundle -j 36
- save_cache:
key: gemfile-2.5-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run:
name: yarn install
command: yarn install
- save_cache:
key: npm-5.5.1-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run:
name: yarn run build
command: yarn run build
- run:
name: create database
command: bundle exec rails db:create db:schema:load --trace
- run:
name: migration database
command: bundle exec rails db:migrate
- run:
name: unit test
command: bundle exec rails test
- run:
name: system test
command: bundle exec rails test:system
- run:
name: js test
command: yarn test ---reporter mocha-junit-reporter ---reporter-options mochaFile=tmp/test_reports/mocha/result.xml
- store_test_results:
path: tmp/test_reports
- store_artifacts:
path: log/test.log
destination: test.log