I am trying to configure a workflow in CircleCi 2.0 containing 3 jobs. I based the workflow on this example: https://github.com/CircleCI-Public/circleci-demo-workflows/blob/workspace-forwarding/.circleci/config.yml. The workflow contains three jobs:
The first job does a checkout and persists to a workspace so that i can attach this in the two other jobs.
The second job runs two npm script which will run npm install, link all the packages with the lerna bootstrap command and as last command npm run build.
The third job also runs an npm script which should run the tests, but the env-cmd package used in the npm script cannot be found.
Is there someone who had a similar problem or knows what I’m doing wrong?
This is my config file:
version: 2 jobs: checkout_code: docker: - image: circleci/node:6.10 working_directory: home/circleci/phoenix steps: - checkout - persist_to_workspace: root: . paths: . build: docker: - image: circleci/node:6.10 working_directory: home/circleci/phoenix steps: - attach_workspace: at: /home/circleci/phoenix - run: name: Install npm packages and link @zicket/packages with the bootstrap command command: npm run bootstrap - run: name: Build the code command: npm run build test: working_directory: home/circleci/phoenix/packages/ticketing-integration-tests docker: - image: circleci/node:6.10 steps: - attach_workspace: at: /home/circleci/phoenix - run: name: Run the ticketing integration tests command: npm run test - store_artifacts: path: coverage workflows: version: 2 build_and_test: jobs: - checkout_code - build: requires: - checkout_code - test: requires: - checkout_code - build