pierre darcas 6 years ago
parent
commit
dd2486b126
  1. 26
      .circleci/config.yml

26
.circleci/config.yml

@ -6,10 +6,10 @@ jobs:
steps: steps:
- checkout # check out the code in the project directory - checkout # check out the code in the project directory
- restore_cache: - restore_cache:
key: yarn-v1-packages-{{ checksum "yarn.lock" }}
key: yarn-v2-packages-{{ checksum "yarn.lock" }}
- run: yarn global add node-gyp && yarn install - run: yarn global add node-gyp && yarn install
- save_cache: - save_cache:
key: yarn-v1-packages-{{ checksum "yarn.lock" }}
key: yarn-v2-packages-{{ checksum "yarn.lock" }}
paths: paths:
- ./node_modules - ./node_modules
lint: lint:
@ -18,10 +18,10 @@ jobs:
steps: steps:
- checkout # check out the code in the project directory - checkout # check out the code in the project directory
- restore_cache: - restore_cache:
key: yarn-v1-packages-{{ checksum "yarn.lock" }}
key: yarn-v2-packages-{{ checksum "yarn.lock" }}
- run: yarn lint && yarn format:check - run: yarn lint && yarn format:check
- save_cache: - save_cache:
key: yarn-v1-packages-{{ checksum "yarn.lock" }}
key: yarn-v2-packages-{{ checksum "yarn.lock" }}
paths: paths:
- ./node_modules - ./node_modules
test: test:
@ -30,10 +30,10 @@ jobs:
steps: steps:
- checkout # check out the code in the project directory - checkout # check out the code in the project directory
- restore_cache: - restore_cache:
key: yarn-v1-packages-{{ checksum "yarn.lock" }}
key: yarn-v2-packages-{{ checksum "yarn.lock" }}
- run: yarn test:ci - run: yarn test:ci
- save_cache: - save_cache:
key: yarn-v1-packages-{{ checksum "yarn.lock" }}
key: yarn-v2-packages-{{ checksum "yarn.lock" }}
paths: paths:
- ./node_modules - ./node_modules
test_e2e: test_e2e:
@ -44,20 +44,20 @@ jobs:
POSTGRES_DB: circleci_tp POSTGRES_DB: circleci_tp
POSTGRES_PASSWORD: pdarcas POSTGRES_PASSWORD: pdarcas
- image: "circleci/node:12" # the primary container, where your job's commands are run - image: "circleci/node:12" # the primary container, where your job's commands are run
steps:
- checkout # check out the code in the project directory
- restore_cache:
key: yarn-v2-packages-{{ checksum "yarn.lock" }}
- run:
command: yarn test:e2e
environement: environement:
DATABASE_URL: postgres://pdarcas:pdarcas@localhost:5432/circleci_tp DATABASE_URL: postgres://pdarcas:pdarcas@localhost:5432/circleci_tp
JWT_SECRET: answer is 42 JWT_SECRET: answer is 42
API_PORT: 3000 API_PORT: 3000
API_HOST: localhost API_HOST: localhost
API_PROTOCOL: http API_PROTOCOL: http
steps:
- checkout # check out the code in the project directory
- restore_cache:
key: yarn-v1-packages-{{ checksum "yarn.lock" }}
- run:
command: yarn test:e2e
- save_cache: - save_cache:
key: yarn-v1-packages-{{ checksum "yarn.lock" }}
key: yarn-v2-packages-{{ checksum "yarn.lock" }}
paths: paths:
- ./node_modules - ./node_modules

Loading…
Cancel
Save