Yield generated for 0ce70447-d401-4fb5-82ab-22a49b5a3022
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.
 
 
 
 

96 lines
2.6 KiB

version: 2.1 # Use version 2.1 to enable orb usage.
orbs:
win: circleci/windows@2.2.0 # The Windows orb give you everything you need to start using the Windows executor.
jobs:
build:
docker:
- image: "circleci/node:12"
steps:
- checkout
- restore_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
- run:
name : install-yarn
command : 'yarn global add node-gyp && yarn install'
- save_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
paths:
- ./node_modules
test:
docker:
- image: "circleci/node:12"
steps:
- checkout
- restore_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
- run: yarn test:ci
- save_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
paths:
- ./node_modules
lint:
docker:
- image: "circleci/node:12"
steps:
- checkout
- restore_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
- run: yarn lint && yarn format:check
- save_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
paths:
- ./node_modules
test-e2e:
docker:
- image: "circleci/node:12"
- image: circleci/postgres:9.6.2-alpine
environment:
- POSTGRES_USER=ahlemfahem
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=projetCi
steps:
- checkout
- restore_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
- run:
command : yarn test:e2e
environment :
DATABASE_URL: postgres://ahlemfahem:admin@localhost:5432/projetCi
JWT_SECRET: hihi
API_PORT: 3000
API_HOST: localhost
API_PROTOCOL: http
- save_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
paths:
- ./node_modules
build_docker_file :
docker:
- image: "circleci/node:12"
steps:
- checkout
- restore_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
- run: yarn install
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Install Docker client
command: |
set -x
VER="18.06.3-ce"
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
- run: yarn ci:docker
workflows:
build:
jobs:
- "build"
- "test"
- "lint"
- "test-e2e"
- "build_docker_file"