Browse Source

feat: config.yml

pull/1/merge
shootylife 6 years ago
parent
commit
5e92de73f8
  1. 80
      .circleci/config.yml

80
.circleci/config.yml

@ -0,0 +1,80 @@
version: 2.1
workflows:
version: 2
build_test:
jobs:
- build
- lint:
requires:
- build
- test:
requires:
- build
- bdd
- test
jobs:
build:
docker: &config
- image: cimg/node:14.10.1
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD
steps:
- checkout
- restore_cache:
keys:
- npm-v3-dependencies-{{ checksum "yarn.lock" }}
- run: yarn global add node-gyp && yarn install
- save_cache:
key: npm-v3-dependencies-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
lint:
docker: *config
steps:
- checkout
- restore_cache:
keys:
- npm-v3-dependencies-{{ checksum "yarn.lock" }}
- run: yarn lint && yarn format:check
test:
docker: *config
steps:
- checkout
- restore_cache:
keys:
- npm-v3-dependencies-{{ checksum "yarn.lock" }}
- run: yarn test:ci
bdd:
docker: *config
environnement:
DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb
JWT_SECRET: some string yo want
API_PORT: 3000
API_HOST: localhost
API_PROTOCOL: http
- image: 'circleci/postgres:9.6.2-alpine'
environnement:
POSTGRES_USER: psqluer
POSTGRES_PASSWORD: psqlpassword
POSTREGS_DB: psdb
steps:
- checkout
- restore_cache:
keys:
- npm-v3-dependencies-{{ checksum "yarn.lock" }}
run: yarn test:e2e
Loading…
Cancel
Save