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

Commit 41e1aaa

Browse files
authored
ci: implement semantic-release (#8)
* ci: implement semantic-release Implemented fully automated releases with semantic-release tool
1 parent ab60978 commit 41e1aaa

File tree

4 files changed

+5872
-111
lines changed

4 files changed

+5872
-111
lines changed

.circleci/config.yml

Lines changed: 26 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,42 @@
1-
# Javascript Node CircleCI 2.0 configuration file
2-
#
3-
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4-
#
51
version: 2
6-
7-
defaults: &defaults
8-
working_directory: ~/repo
9-
docker:
10-
- image: circleci/node:10.16.0
11-
122
jobs:
13-
test:
14-
<<: *defaults
3+
test_node_8:
4+
docker:
5+
- image: circleci/node:8
156
steps:
167
- checkout
17-
18-
- restore_cache:
19-
keys:
20-
- v1-dependencies-{{ checksum "package.json" }}
21-
# fallback to using the latest cache if no exact match is found
22-
- v1-dependencies-
23-
248
- run: npm install
259
- run:
2610
name: Run tests
2711
command: npm test
2812

29-
- save_cache:
30-
paths:
31-
- node_modules
32-
key: v1-dependencies-{{ checksum "package.json" }}
33-
34-
- persist_to_workspace:
35-
root: ~/repo
36-
paths: .
37-
deploy:
38-
<<: *defaults
13+
test_node_10:
14+
docker:
15+
- image: circleci/node:10
3916
steps:
40-
- attach_workspace:
41-
at: ~/repo
42-
- run:
43-
name: Authenticate with registry
44-
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc
17+
- checkout
18+
- run: npm install
4519
- run:
46-
name: Publish package
47-
command: npm publish
20+
name: Run tests
21+
command: npm test
22+
23+
release:
24+
docker:
25+
- image: circleci/node:10
26+
steps:
27+
- checkout
28+
- run: npm install
29+
- run: npm run build
30+
- run: npx semantic-release
4831

4932
workflows:
5033
version: 2
51-
test-deploy:
34+
test_and_release:
35+
# Run the test jobs first, then the release only when all the test jobs are successful
5236
jobs:
53-
- test:
54-
filters:
55-
tags:
56-
only: /^v.*/
57-
- deploy:
37+
- test_node_8
38+
- test_node_10
39+
- release:
5840
requires:
59-
- test
60-
filters:
61-
tags:
62-
only: /^v.*/
63-
branches:
64-
ignore: /.*/
41+
- test_node_8
42+
- test_node_10

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# NestJS Addons: In-Memory DB Service
22

3+
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
4+
5+
[![CircleCI](https://circleci.com/gh/nestjs-addons/in-memory-db.svg?style=svg)](https://circleci.com/gh/nestjs-addons/in-memory-db)
6+
7+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
8+
39
## Description
410

511
`@nestjs-addons/in-memory-db` provides a ridiculously simple, no configuration needed, way to create a simple in-memory database for use in your `nestjs` applications. You simply define an `interface` that extends the `interface InMemoryEntity`, inject the `InMemoryDBService<T>` into your controllers and/or services, and immediately profit. The records are stored in-memory, as a singleton, for each interface, for the life of the service.
@@ -14,7 +20,7 @@ $ npm i --save @nestjs-addons/in-memory-db
1420

1521
## Video Walkthrough
1622

17-
[![](http://img.youtube.com/vi/eSx6nKDw5PQ/0.jpg)](http://www.youtube.com/watch?v=eSx6nKDw5PQ "NestJS Addons - In Memory DB - Walkthrough")
23+
[![](http://img.youtube.com/vi/eSx6nKDw5PQ/0.jpg)](http://www.youtube.com/watch?v=eSx6nKDw5PQ 'NestJS Addons - In Memory DB - Walkthrough')
1824

1925
## Quick Start
2026

0 commit comments

Comments
 (0)