version: 2.1 # Define the jobs we want to run for this project workflow: build: jobs: - build - lint: requires: - build - tu: requires: - build - teste2e: requires: - build jobs: build: docker: - image: cimg/node:14.10.1 steps: - checkout - restore_cache: key: npm-v1-dependencies-{{ checksum "yarn.lock" }} - run: yarn global add node-gyp && yarn install - save_cache: key: npm-v1-dependencies-{{ checksum "yarn.lock" }} paths: - ./node_modules lint: docker: - image: cimg/node:14.10.1 steps: - checkout - restore_cache: key: npm-v1-dependencies-{{ checksum "yarn.lock" }} - run: yarn lint & yarn format:check tu: docker: - image: cimg/node:14.10.1 steps: - checkout - restore_cache: key: npm-v1-dependencies-{{ checksum "yarn.lock" }} - run: yarn test:ci teste2e: docker: - image: cimg/node:14.10.1 environment: DATABASE_URL: postgres://root:chiara@localhost:5432/circle-test_test JWT_SECRET: ok API_PORT: 3000 API_HOST: localhost API_PROTOCOL: http - image: circleci/postgres:9.6.2-alpine environment: POSTGRES_USER: root POSTGRES_BD: circle-test_test POSTEGRES_PASSWORD: chiara steps: - checkout - restore_cache: key: npm-v1-dependencies-{{ checksum "yarn.lock" }} - run: command: yarn test:e2e