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

Commit fef8dd3

Browse files
authored
Merge pull request #117 from AtomLinter/arcanemagus/circleci-2.0
Upgrade to CircleCI 2.0
2 parents a4ba534 + d402228 commit fef8dd3

File tree

2 files changed

+128
-25
lines changed

2 files changed

+128
-25
lines changed

.circleci/config.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
version: 2
2+
3+
defaults: &defaults
4+
working_directory: /tmp/project
5+
docker:
6+
- image: arcanemagus/atom-docker-ci:stable
7+
environment:
8+
# Pre-install the required language file as package activation doesn't wait
9+
# for the installation to complete.
10+
APM_TEST_PACKAGES: language-elixir
11+
steps:
12+
# Restore project state
13+
- attach_workspace:
14+
at: /tmp
15+
- run:
16+
name: Install gnupg2
17+
command: |
18+
sudo apt-get update && \
19+
sudo apt-get install --assume-yes --quiet --no-install-suggests \
20+
--no-install-recommends gnupg2
21+
- run:
22+
name: Install Erlang repository
23+
command: |
24+
curl -O https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
25+
sudo dpkg -i erlang-solutions_1.0_all.deb
26+
- run:
27+
name: Install Erlang/OTP platform and Elixir
28+
command: |
29+
sudo apt-get update && \
30+
sudo apt-get install --assume-yes --quiet --no-install-suggests \
31+
--no-install-recommends esl-erlang elixir
32+
- run:
33+
name: Elixir version
34+
# Note: This also prints the Erlang version, which is nice as the way
35+
# to print it directly is longer than this entire comment...
36+
command: elixir --version
37+
- run:
38+
name: Create VFB for Atom to run in
39+
command: /usr/local/bin/xvfb_start
40+
- run:
41+
name: Atom version
42+
command: ${ATOM_SCRIPT_PATH} --version
43+
- run:
44+
name: APM version
45+
command: ${APM_SCRIPT_PATH} --version
46+
- run:
47+
name: Cleaning package
48+
command: ${APM_SCRIPT_PATH} clean
49+
- run:
50+
name: Package APM package dependencies
51+
command: |
52+
if [ -n "${APM_TEST_PACKAGES}" ]; then
53+
for pack in ${APM_TEST_PACKAGES}; do
54+
${APM_SCRIPT_PATH} install "${pack}"
55+
done
56+
fi;
57+
- run:
58+
name: Package dependencies
59+
command: ${APM_SCRIPT_PATH} install
60+
- run:
61+
name: Package specs
62+
command: ${ATOM_SCRIPT_PATH} --test spec
63+
# Cache node_modules
64+
- save_cache:
65+
paths:
66+
- node_modules
67+
key: v1-dependencies-{{ checksum "package.json" }}
68+
69+
jobs:
70+
checkout_code:
71+
<<: *defaults
72+
docker:
73+
- image: circleci/node:latest
74+
steps:
75+
- checkout
76+
# Restore node_modules from the last build
77+
- restore_cache:
78+
keys:
79+
# Get latest cache for this package.json
80+
- v1-dependencies-{{ checksum "package.json" }}
81+
# Fallback to the last available cache
82+
- v1-dependencies
83+
# Save project state for next steps
84+
- persist_to_workspace:
85+
root: /tmp
86+
paths:
87+
- project
88+
lint:
89+
<<: *defaults
90+
docker:
91+
- image: circleci/node:latest
92+
steps:
93+
# Restore project state
94+
- attach_workspace:
95+
at: /tmp
96+
- run:
97+
name: Node.js Version
98+
command: node --version
99+
- run:
100+
name: NPM Version
101+
command: npm --version
102+
- run:
103+
name: Install any remaining dependencies
104+
command: npm install
105+
- run:
106+
name: Lint code
107+
command: npm run lint
108+
stable:
109+
<<: *defaults
110+
beta:
111+
<<: *defaults
112+
docker:
113+
- image: arcanemagus/atom-docker-ci:beta
114+
115+
workflows:
116+
version: 2
117+
test_package:
118+
jobs:
119+
- checkout_code
120+
- lint:
121+
requires:
122+
- checkout_code
123+
- stable:
124+
requires:
125+
- lint
126+
- beta:
127+
requires:
128+
- lint

circle.yml

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

0 commit comments

Comments
 (0)