Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit fb04d98

Browse files
committed
Adds CircleCI config + Missing React dependency
1 parent 12db2be commit fb04d98

File tree

3 files changed

+55
-906
lines changed

3 files changed

+55
-906
lines changed

.circleci/config.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: 2
2+
jobs:
3+
# Release.
4+
# TODO: Probably, it is possible to reuse the test job below as a part of
5+
# the release job; but as I don't know how to do it at the moment, let's
6+
# just dublicate the logic for now.
7+
release:
8+
docker:
9+
- image: circleci/node:8.9.4
10+
steps:
11+
- checkout
12+
- restore_cache:
13+
# Careful here, though, at the moment, there should be no problem
14+
# to reuse the same cache of "node_modules" between test and release
15+
# jobs.
16+
key: test-node-modules-{{ checksum "package-lock.json" }}
17+
- run: npm install
18+
- save_cache:
19+
key: test-node-modules-{{ checksum "package-lock.json" }}
20+
paths:
21+
- node_modules
22+
- run: npm test
23+
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
24+
- run: npm publish
25+
26+
# Just tests commited code.
27+
test:
28+
docker:
29+
- image: circleci/node:8.9.4
30+
steps:
31+
- checkout
32+
- restore_cache:
33+
key: test-node-modules-{{ checksum "package-lock.json" }}
34+
- run: npm install
35+
- save_cache:
36+
key: test-node-modules-{{ checksum "package-lock.json" }}
37+
paths:
38+
- node_modules
39+
- run: npm test
40+
41+
workflows:
42+
version: 2
43+
build:
44+
jobs:
45+
- release:
46+
filters:
47+
branches:
48+
only: master
49+
- test:
50+
filters:
51+
branches:
52+
ignore: master
53+

0 commit comments

Comments
 (0)