|
|
|
@ -0,0 +1,37 @@ |
|
|
|
version: 2 |
|
|
|
jobs: |
|
|
|
build: &shared-config |
|
|
|
docker: |
|
|
|
- image: circleci/node:lts-fermium |
|
|
|
working_directory: ~/repo |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- restore_cache: |
|
|
|
keys: |
|
|
|
- dependencies-{{ checksum "package.json" }}-v1 |
|
|
|
- dependencies- |
|
|
|
- run: yarn install |
|
|
|
- save_cache: |
|
|
|
paths: |
|
|
|
- node_modules |
|
|
|
key: dependencies-{{ checksum "package.json" }}-v1 |
|
|
|
lint: |
|
|
|
<<: *shared-config |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- restore_cache: |
|
|
|
key: dependencies-{{ checksum "package.json" }}-v1 |
|
|
|
- run: yarn lint |
|
|
|
- run: yarn format:check |
|
|
|
|
|
|
|
back-test-unit: |
|
|
|
<<: *shared-config |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- restore_cache: |
|
|
|
key: dependencies-{{ checksum "package.json" }}-v1 |
|
|
|
- run: |
|
|
|
command: yarn test |
|
|
|
environment: |
|
|
|
DATABASE_URL: postgres://$PG_USER:$PG_PWD@localhost:5432/$PG_USER |
|
|
|
|