forked from lingui/js-lingui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
120 lines (91 loc) · 2.35 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: 2
workflows:
version: 2
test_n_deploy:
jobs:
- test-linter
- test-node6:
requires:
- test-linter
- test-node8:
requires:
- test-linter
- build-docs:
requires:
- test-node6
- test-node8
jobs:
test-node8: &test-template
docker:
- image: circleci/node:8
steps:
- checkout
- run:
name: Install build tools
command: sudo yarn global add codecov
- restore_cache:
key: node-modules-{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: |
yarn install
yarn run bootstrap
- save_cache:
key: node-modules-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run: yarn test
- run:
name: Send coverage report
command: |
if [ "${NODEJS}" == "4" ]; then
codecov
fi
- store_test_results:
path: junitresults.xml
when: on_fail
test-node6:
<<: *test-template
docker:
- image: circleci/node:6
test-linter:
docker:
- image: circleci/node:latest
steps:
- checkout
- run:
name: Install build tools
command: sudo yarn global add codecov
- restore_cache:
key: node-modules-{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: |
yarn install
yarn run bootstrap
- save_cache:
key: node-modules-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run: yarn run lint
build-docs:
docker:
- image: circleci/python:latest
environment:
PYGMENTS_NODE_COMMAND: /usr/local/bin/node
steps:
- checkout
- run: sudo pip install pipenv
- restore_cache:
key: pipenv-{{ checksum "Pipfile.lock" }}
- run: pipenv install
- save_cache:
key: pipenv-{{ checksum "Pipfile.lock" }}
paths:
- "{{ pipenv --venv }}"
- run: source $(pipenv --venv)/bin/activate && cd docs && make html
- deploy:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
./scripts/deploy-docs.sh
fi