workflows: version: 2.1 do-some-magic: jobs: - build - job2: requires: - build - job3: requires: - build version: 2.1 jobs: build: docker: - image: cimg/node:14.15.0 # the primary container, where your job's commands are run auth: username: $AUTH_DOCKER password: $PSW_DOCKER # context / project UI env-var reference environment: TEST_DATABASE_URL: $DATABASE_URL # Service container image - image: circleci/postgres:9.6.5-alpine-ram auth: username: $AUTH_DOCKER password: $PSW_DOCKER # context / project UI env-var reference steps: - checkout # check out the code in the project directory - run: install postgresql-client-9.6 - run: yarn install - save_cache: key: npm-v1-dependencies-{{ checksum "yarn.lock" }} paths: - node_modules job2: docker: - image: cimg/node:14.15.0 # the primary container, where your job's commands are run auth: username: $AUTH_DOCKER password: $PSW_DOCKER # context / project UI env-var reference steps: - checkout - restore_cache: key: npm-v1-dependencies-{{ checksum "yarn.lock" }} - run: yarn lint - run: yarn format:check job3: docker: - image: cimg/node:14.15.0 # the primary container, where your job's commands are run auth: username: $AUTH_DOCKER password: $PSW_DOCKER # context / project UI env-var reference steps: - checkout - restore_cache: key: npm-v1-dependencies-{{ checksum "yarn.lock" }} - run: yarn test