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

Commit 7122d49

Browse files
committed
Update of dependencies + improved CircleCI config
1 parent 1439b03 commit 7122d49

File tree

3 files changed

+120
-163
lines changed

3 files changed

+120
-163
lines changed

.circleci/config.yml

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,51 @@
1+
defaults: &defaults
2+
docker:
3+
- image: circleci/node:8.11.2
4+
15
version: 2
26
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:
7+
test:
8+
<<: *defaults
89
docker:
910
- image: circleci/node:8.9.4
1011
steps:
1112
- checkout
1213
- 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" }}
14+
key: node-modules-{{ checksum "package-lock.json" }}
1715
- run: npm install
1816
- save_cache:
19-
key: test-node-modules-{{ checksum "package-lock.json" }}
17+
key: node-modules-{{ checksum "package-lock.json" }}
2018
paths:
2119
- node_modules
2220
- 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
21+
- run: npm run build
22+
- persist_to_workspace:
23+
root: .
24+
paths:
25+
- dist
26+
release:
27+
<<: *defaults
3028
steps:
3129
- 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
30+
- attach_workspace:
31+
at: .
32+
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
33+
- run: npm publish
4034

4135
workflows:
4236
version: 2
4337
build:
4438
jobs:
45-
- release:
46-
filters:
47-
branches:
48-
only: master
4939
- test:
40+
filters:
41+
tags:
42+
only:
43+
/.*/
44+
- release:
5045
filters:
5146
branches:
52-
ignore: master
53-
47+
ignore: /.*/
48+
tags:
49+
only: /v[0-9]+(\.[0-9]+)*/
50+
requires:
51+
- test

0 commit comments

Comments
 (0)