Skip to content

Commit 220b4f2

Browse files
committed
Update of CircleCI config
1 parent f628b85 commit 220b4f2

File tree

2 files changed

+23
-32
lines changed

2 files changed

+23
-32
lines changed

.circleci/config.yml

+19-32
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,40 @@
11
version: 2
22
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:
3+
# Code testing
4+
test:
85
docker:
9-
- image: circleci/node:8.9.4
6+
- image: circleci/node:8.11.1
107
steps:
118
- checkout
129
- 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" }}
10+
key: node-modules-{{ checksum "package-lock.json" }}
1711
- run: npm install
1812
- save_cache:
19-
key: test-node-modules-{{ checksum "package-lock.json" }}
13+
key: node-modules-{{ checksum "package-lock.json" }}
2014
paths:
2115
- node_modules
2216
- run: npm test
23-
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
24-
- run: npm publish
17+
- run: npm build
18+
- persist_to_workspace:
19+
root: /root/project
20+
paths: .
2521

26-
# Just tests commited code.
27-
test:
22+
# NPM release
23+
release:
2824
docker:
29-
- image: circleci/node:8.9.4
25+
- image: circleci/node:8.11.1
3026
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
27+
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
28+
- run: npm publish
4029

4130
workflows:
4231
version: 2
4332
build:
4433
jobs:
34+
- test
4535
- release:
4636
filters:
47-
branches:
48-
only: master
49-
- test:
50-
filters:
51-
branches:
52-
ignore: master
53-
37+
tags:
38+
only: /v[0-9]+(\.[0-9]+)*/
39+
requires:
40+
- test

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Topcoder React Lib
2+
![Dev Build Status](https://img.shields.io/circleci/project/github/topcoder-platform/topcoder-react-lib/develop.svg?label=develop)
3+
![Master Build Status](https://img.shields.io/circleci/project/github/topcoder-platform/topcoder-react-lib/master.svg?label=master)
4+
![Latest NPM Release](https://img.shields.io/npm/v/topcoder-react-lib.svg)
5+
![NPM Downloads](https://img.shields.io/npm/dm/topcoder-react-lib.svg)
26

37
The [Topcoder](https://www.topcoder.com) lib for internal ReactJS projects.
48

0 commit comments

Comments
 (0)