forked from GuruSam/manta-front-end
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
76 lines (72 loc) · 1.89 KB
/
config.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
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
aliases:
- &filter-non-gh-pages
branches:
ignore:
- gh-pages
- &filter-only-master
branches:
only:
- master
version: 2
jobs:
test:
docker:
- image: circleci/node:12.13
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Install
command: |
sudo apt-get install libusb-1.0-0-dev
yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run:
name: Syntax Lint
command: yarn lint:ci
- run:
name: Test
command: yarn test
- persist_to_workspace:
# relative to working_directory
root: "./"
paths:
- "./"
deploy:
docker:
- image: circleci/node:12.13
working_directory: ~/repo
steps:
- attach_workspace:
at: ~/repo
- run:
name: Build & Deploy
# added skip host key checking to avoid the manual prompt
command: |
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
git config --global user.email "[email protected]"
git config --global user.name "Devhub Deployer"
yarn deploy
workflows:
version: 2
test_deploy:
jobs:
- test:
filters: *filter-non-gh-pages
- deploy:
filters: *filter-only-master
requires:
- test