Skip to content

Commit

Permalink
Merge pull request #7 from kahoowkh/add-cd
Browse files Browse the repository at this point in the history
Add cd
  • Loading branch information
Marcotsept committed Jun 29, 2021
2 parents 7443511 + 2027fe6 commit 3863f03
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 10 deletions.
52 changes: 49 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ refs:
docker:
- image: node:12
environment:
DATABASE_URL: 'postgres://test-user@localhost:5432/test-db'
DATABASE_URL: "postgres://test-user@localhost:5432/test-db"
- image: postgres:13
environment:
POSTGRES_USER: test-user
Expand All @@ -19,6 +19,18 @@ refs:
run:
name: Install Dependencies
command: yarn
- &RestoreCache
restore_cache:
name: Restore Dependencies Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- yarn-packages- # used if checksum fails
- &SaveCache
save_cache:
name: Save Dependencies Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- node_modules
- &Test
run:
name: Test
Expand All @@ -33,22 +45,56 @@ jobs:
<<: *container
steps:
- checkout
- *RestoreCache
- *Install
- *SaveCache
- *Test
report:
<<: *container
steps:
- checkout
- *RestoreCache
- *Install
- *SaveCache
- *Report
deploy:
<<: *container
steps:
- checkout
- *RestoreCache
- *Install
- *SaveCache
- run:
name: Build
command: yarn build
- run:
name: Set registry URL
command: npm set registry https://registry.npmjs.org/
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run:
name: Publish package
command: npm publish

workflows:
version: 2
all:
jobs:
- test
- test:
filters:
tags:
only: /.*/
- report:
filters:
branches:
only:
- master
- master
- deploy:
requires:
- test
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# nestjs-database-trigger

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

[![NPM](https://nodei.co/npm/nestjs-database-trigger.png)](https://nodei.co/npm/nestjs-database-trigger/)

[![npm version](https://badge.fury.io/js/nestjs-database-trigger.svg)](https://badge.fury.io/js/nestjs-database-trigger)
![npm](https://img.shields.io/npm/dm/nestjs-database-trigger)
[![CircleCI](https://circleci.com/gh/kahoowkh/nestjs-database-trigger.svg?style=svg)](https://circleci.com/gh/kahoowkh/nestjs-database-trigger)
[![Coverage Status](https://coveralls.io/repos/github/kahoowkh/nestjs-database-trigger/badge.svg?branch=master)](https://coveralls.io/github/kahoowkh/nestjs-database-trigger?branch=master)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

# Description

This is a SQL (currently support only PostgreSQL) database trigger module for [NestJS]("http://nestjs.com/") which allow you to use decorators on SQL triggers.

# Installation

```
$ npm install nestjs-database-trigger -save
$ npm install nestjs-database-trigger --save
```

# Example
Expand Down

0 comments on commit 3863f03

Please sign in to comment.