-
Notifications
You must be signed in to change notification settings - Fork 60
/
circle.yml
78 lines (78 loc) · 1.99 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
66
67
68
69
70
71
72
73
74
75
76
77
78
version: 2
jobs:
build:
docker:
- image: zacharygolba/lux-framework:latest
environment:
NODE_ENV: test
DATABASE_USERNAME: root
- image: mysql:5.7
environment:
MYSQL_DATABASE: lux_test
MYSQL_ALLOW_EMPTY_PASSWORD: yes
- image: postgres:9.6
environment:
POSTGRES_USER: root
POSTGRES_DB: lux_test
parallelism: 3
working_directory: ~/lux
steps:
- checkout
- restore_cache:
keys:
- dependency-cache-
- run:
name: Install Dependencies
command: |
yarn global remove lux-framework
yarn install
cd test/test-app
yarn install
cd ../../
- save_cache:
key: dependency-cache-{{ epoch }}
paths:
- ~/.yarn
- ~/.yarn-cache
- restore_cache:
key: eslint-cache-
- run:
name: Lint
command: yarn lint
- save_cache:
key: eslint-cache-{{ epoch }}
paths:
- ~/lux/.eslintcache
- run:
name: Check Types
command: yarn flow
- run:
name: Compile
command: |
yarn run clean
NODE_ENV=production yarn build
yarn link
cd test/test-app
lux build -e test
cd ../../
- run:
name: Seed Database
command: |
if [ "${CIRCLE_NODE_INDEX}" != "2" ]; then
cd test/test-app
lux db:migrate -e test --skip-build
lux db:seed -e test --skip-build
cd ../../
fi
- restore_cache:
key: jest-cache-
- run:
name: Test
command: yarn test -- -w=8 --colors --coverage
- save_cache:
key: jest-cache-{{ epoch }}
paths:
- ~/lux/.jest-cache
- run:
name: Report Coverage
command: yarn codecov