-
Notifications
You must be signed in to change notification settings - Fork 10
/
circle.yml
93 lines (85 loc) · 2.26 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
version: 2
defaults: &defaults
docker:
- image: circleci/node:10-browsers
environment:
COVERAGE: true
JOBS: 2
jobs:
install:
<<: *defaults
steps:
- checkout
- restore_cache:
key: node-deps-{{ checksum "yarn.lock" }}
- run:
name: Install node dependencies
command: |
if [ ! -d node_modules ]; then
yarn --pure-lockfile
fi
- run:
name: Install CodeClimate
command: |
mkdir -p ../codeclimate
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ../codeclimate/cc-test-reporter
chmod +x ../codeclimate/cc-test-reporter
- save_cache:
key: node-deps-{{ checksum "yarn.lock" }}
paths:
- node_modules
- ../codeclimate
test:
<<: *defaults
steps:
- checkout
- restore_cache:
key: node-deps-{{ checksum "yarn.lock" }}
- run:
name: Set up CodeClimate
command: ../codeclimate/cc-test-reporter before-build
- run:
name: Test
environment:
CIRCLE_TEST_REPORTS: test-results
command: npx ember test
- run:
name: Upload CodeClimate test results
command: ../codeclimate/cc-test-reporter after-build --exit-code $?
- store_test_results:
path: test-results/
deploy:
<<: *defaults
steps:
- checkout
- restore_cache:
key: node-deps-{{ checksum "yarn.lock" }}
- add_ssh_keys:
fingerprints:
- "11:a2:20:e3:5b:2e:16:b1:d4:3e:05:e5:1c:5f:4c:26"
- run:
name: Deploy to GitHub Pages
command: |
git config --global user.email "deploy@circleci"
git config --global user.name "deploy"
npx ember deploy production
workflows:
version: 2
install-test-deploy:
jobs:
- install:
filters:
tags:
only: /.*/
- test:
filters:
tags:
only: /.*/
requires:
- install
- deploy:
requires:
- test
filters:
branches:
only: master