Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit bef5e4d

Browse files
authored
Merge pull request #90 from AtomLinter/arcanemagus/circleci-2.0
Upgrade to CircleCI 2.0
2 parents 0430d7d + 195b1f2 commit bef5e4d

File tree

2 files changed

+102
-8
lines changed

2 files changed

+102
-8
lines changed

.circleci/config.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
version: 2
2+
3+
defaults: &defaults
4+
working_directory: /tmp/project
5+
docker:
6+
- image: arcanemagus/atom-docker-ci:stable
7+
steps:
8+
# Restore project state
9+
- attach_workspace:
10+
at: /tmp
11+
- run:
12+
name: Create VFB for Atom to run in
13+
command: /usr/local/bin/xvfb_start
14+
- run:
15+
name: Atom version
16+
command: ${ATOM_SCRIPT_PATH} --version
17+
- run:
18+
name: APM version
19+
command: ${APM_SCRIPT_PATH} --version
20+
- run:
21+
name: Cleaning package
22+
command: ${APM_SCRIPT_PATH} clean
23+
- run:
24+
name: Package APM package dependencies
25+
command: |
26+
if [ -n "${APM_TEST_PACKAGES}" ]; then
27+
for pack in ${APM_TEST_PACKAGES}; do
28+
${APM_SCRIPT_PATH} install "${pack}"
29+
done
30+
fi;
31+
- run:
32+
name: Package dependencies
33+
command: ${APM_SCRIPT_PATH} install
34+
- run:
35+
name: Package specs
36+
command: ${ATOM_SCRIPT_PATH} --test spec
37+
# Cache node_modules
38+
- save_cache:
39+
paths:
40+
- node_modules
41+
key: v1-dependencies-{{ checksum "package.json" }}
42+
43+
jobs:
44+
checkout_code:
45+
<<: *defaults
46+
docker:
47+
- image: circleci/node:latest
48+
steps:
49+
- checkout
50+
# Restore node_modules from the last build
51+
- restore_cache:
52+
keys:
53+
# Get latest cache for this package.json
54+
- v1-dependencies-{{ checksum "package.json" }}
55+
# Fallback to the last available cache
56+
- v1-dependencies
57+
# Save project state for next steps
58+
- persist_to_workspace:
59+
root: /tmp
60+
paths:
61+
- project
62+
lint:
63+
<<: *defaults
64+
docker:
65+
- image: circleci/node:latest
66+
steps:
67+
# Restore project state
68+
- attach_workspace:
69+
at: /tmp
70+
- run:
71+
name: Node.js Version
72+
command: node --version
73+
- run:
74+
name: NPM Version
75+
command: npm --version
76+
- run:
77+
name: Install any remaining dependencies
78+
command: npm install
79+
- run:
80+
name: Lint code
81+
command: npm run lint
82+
stable:
83+
<<: *defaults
84+
beta:
85+
<<: *defaults
86+
docker:
87+
- image: arcanemagus/atom-docker-ci:beta
88+
89+
workflows:
90+
version: 2
91+
test_package:
92+
jobs:
93+
- checkout_code
94+
- lint:
95+
requires:
96+
- checkout_code
97+
- stable:
98+
requires:
99+
- lint
100+
- beta:
101+
requires:
102+
- lint

circle.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)