step-restore-cache: &step-restore-cache restore_cache: keys: - v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }} - v1-dependencies-{{ arch }} steps-test: &steps-test steps: - run: name: Install OS Dependencies command: | case "$(uname)" in Linux) sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install --no-install-recommends -y wine32 wine ;; Darwin) brew install wine ;; esac - checkout - *step-restore-cache - run: yarn - save_cache: paths: - node_modules key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }} - run: yarn test version: 2 jobs: test-linux-8: docker: - image: circleci/node:8 <<: *steps-test test-linux-10: docker: - image: circleci/node:10 <<: *steps-test test-mac: macos: xcode: "10.2.0" <<: *steps-test release: docker: - image: circleci/node:10.15 steps: - checkout - *step-restore-cache - run: yarn - run: npx semantic-release workflows: version: 2 test_and_release: # Run the test jobs first, then the release only when all the test jobs are successful jobs: - test-linux-8 - test-linux-10 - test-mac - release: requires: - test-linux-8 - test-linux-10 - test-mac filters: branches: only: - master