You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.4 KiB
58 lines
1.4 KiB
version: 2.1
|
|
executors:
|
|
node-executor:
|
|
docker:
|
|
- image: circleci/node:12
|
|
auth:
|
|
username: $DOCKERHUB_LOGIN
|
|
password: $DOCKERHUB_PASSWORD
|
|
postgresql-executor:
|
|
docker:
|
|
- image: circleci/postgres
|
|
auth:
|
|
username: $DOCKERHUB_LOGIN
|
|
password: $DOCKERHUB_PASSWORD
|
|
jobs:
|
|
build:
|
|
executor: node-executor
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Install dependencies
|
|
command: yarn global add node-gyp && yarn install
|
|
- save_cache:
|
|
name: Save Yarn package cache
|
|
key: npm-v7-dependencies-{{ checksum "yarn.lock" }}
|
|
paths:
|
|
- ./node_modules
|
|
lint:
|
|
executor: node-executor
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
name: Restore yarn package cache
|
|
key: npm-v7-dependencies-{{ checksum "yarn.lock" }}
|
|
- run:
|
|
name: Analyse code with tslint and format with prettier
|
|
command: yarn lint && yarn format:check
|
|
test:
|
|
executor: node-executor
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
name: Restore yarn package cache
|
|
key: npm-v7-dependencies-{{ checksum "yarn.lock" }}
|
|
- run:
|
|
name: Run test with jest
|
|
command: yarn test:ci
|
|
workflows:
|
|
version: 2
|
|
integration:
|
|
jobs:
|
|
- build
|
|
- lint:
|
|
requires:
|
|
- build
|
|
- test:
|
|
requires:
|
|
- build
|