Browse Source

Update config.yml

main
NicolasLepinette 6 years ago
committed by GitHub
parent
commit
dedd69e9ee
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 52
      .circleci/config.yml

52
.circleci/config.yml

@ -1,14 +1,34 @@
workflows: workflows:
install:
jobs: jobs:
build:
- yarn
- lint:
requires:
- yarn
tests:
jobs:
- bdd
jobs:
yarn:
docker: docker:
- image: cimg/node:14.10.1 # the primary container, where your job's commands are run
- image: 'circleci/node:12'
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
key: yarn-packages-{{ checksum "yarn.lock" }} key: yarn-packages-{{ checksum "yarn.lock" }}
- run: yarn global add node-gyp - run: yarn global add node-gyp
- run: yarn install - run: yarn install
- save_cache:
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
lint:
docker:
- image: 'circleci/node:12'
steps:
- checkout
- restore_cache:
key: yarn-packages-{{ checksum "yarn.lock" }}
- run: yarn lint - run: yarn lint
- run: yarn format:check - run: yarn format:check
- run: yarn test:ci - run: yarn test:ci
@ -16,3 +36,31 @@ jobs:
key: yarn-packages-{{ checksum "yarn.lock" }} key: yarn-packages-{{ checksum "yarn.lock" }}
paths: paths:
- ./node_modules - ./node_modules
bdd:
docker:
- image: 'circleci/node:12'
environment:
DATABASE_URL: postgres://psqluser:psqlpassword@localhost:5432/psdb
JWT_SECRET: bla bla
API_PORT: 3000
API_HOST: localhost
API_PROTOCOL: http
- image: 'circleci/postgres:9.6.2-alpine'
environment:
POSTGRES_USER: psqluser
POSTGRES_PASSWORD: psqlpassword
POSTGRES_DB: psdb
steps:
- checkout
- restore_cache:
key: yarn-packages-{{ checksum "yarn.lock" }}
- run: yarn test:e2e
- save_cache:
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
Loading…
Cancel
Save