From dbe421b270e41f5450217a6724de411832acc27d Mon Sep 17 00:00:00 2001 From: Nicolas Beaussart Date: Wed, 5 Feb 2020 21:21:18 +0100 Subject: [PATCH] :green_heart: fix circle ci share commands --- .circleci/config.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ff8337..fd2c054 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,18 +1,23 @@ -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli +version: 2.1 +commands: + setup_deps: + description: 'Setup cache and do a yarn install' steps: - checkout - - restore_cache: &restore_cache + - restore_cache: keys: - v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - v1-npm-{{checksum ".circleci/config.yml"}} - - run: &yarn_install + - run: name: Install dependencies command: yarn +jobs: + node-latest: &test + docker: + - image: node:latest + working_directory: ~/cli + steps: + - setup_deps - run: ./bin/run --version - run: ./bin/run --help - run: @@ -29,8 +34,7 @@ jobs: prettier: <<: *test steps: - - checkout - - *yarn_install + - setup_deps - run: name: Check prettier command: yarn format:check @@ -38,7 +42,9 @@ jobs: <<: *test steps: - checkout - - *yarn_install + - run: + name: Install dependencies + command: yarn - save_cache: key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} paths: @@ -48,9 +54,7 @@ jobs: release: <<: *test steps: - - checkout - - *restore_cache - - *yarn_install + - setup_deps - run: name: release command: yarn release || true