This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathconfig.yml
107 lines (104 loc) · 2.86 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
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
version: 2
defaults: &defaults
working_directory: /tmp/project
docker:
- image: arcanemagus/atom-docker-ci:stable
steps:
# Restore project state
- attach_workspace:
at: /tmp
- run:
name: Create VFB for Atom to run in
command: /usr/local/bin/xvfb_start
- run:
name: Atom version
command: ${ATOM_SCRIPT_PATH} --version
- run:
name: APM version
command: ${APM_SCRIPT_PATH} --version
- run:
name: Package APM package dependencies
command: |
if [ -n "${APM_TEST_PACKAGES}" ]; then
for pack in ${APM_TEST_PACKAGES}; do
${APM_SCRIPT_PATH} install "${pack}"
done
fi;
- run:
name: Package dependencies
command: ${APM_SCRIPT_PATH} install
- run:
name: Cleaning package
command: ${APM_SCRIPT_PATH} clean
- run:
name: Package specs
command: ${ATOM_SCRIPT_PATH} --test spec
# Cache node_modules
- save_cache:
paths:
- node_modules
key: v2-dependencies-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json"}}
jobs:
checkout_code:
<<: *defaults
docker:
- image: circleci/node:latest
steps:
- checkout
# Restore node_modules from the last build
- restore_cache:
keys:
# Get latest cache for this package.json and pacakge-lock.json
- v2-dependencies-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json"}}
# Fallback to the current package.json
- v2-dependencies-{{ .Branch }}-{{ checksum "package.json" }}-
# Fallback to the last build for this branch
- v2-dependencies-{{ .Branch }}-
# Fallback to the last available master branch cache
- v2-dependencies-master-
# Don't go further down to prevent dependency issues from other branches
# Save project state for next steps
- persist_to_workspace:
root: /tmp
paths:
- project
lint:
<<: *defaults
docker:
- image: circleci/node:latest
steps:
# Restore project state
- attach_workspace:
at: /tmp
- run:
name: Node.js Version
command: node --version
- run:
name: NPM Version
command: npm --version
- run:
name: Install any remaining dependencies
command: npm install
- run:
name: Lint code
command: npm run lint
stable:
<<: *defaults
beta:
<<: *defaults
docker:
- image: arcanemagus/atom-docker-ci:beta
workflows:
version: 2
test_package:
jobs:
- checkout_code
- lint:
requires:
- checkout_code
- stable:
requires:
- lint
- beta:
requires:
- lint