From 48e3cbe002662f4ec973690409aed47bb2cf08ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20M=C5=82odzikowski?= Date: Thu, 27 Jul 2023 14:44:02 +0200 Subject: [PATCH] feat(ci): fix installing deps --- .github/workflows/console-test-run.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/console-test-run.yml b/.github/workflows/console-test-run.yml index 238bb368d..99dfb5a17 100644 --- a/.github/workflows/console-test-run.yml +++ b/.github/workflows/console-test-run.yml @@ -21,6 +21,18 @@ jobs: with: ref: ${{ inputs.github-sha }} #---------------------------------------------- + # cache node modules + #---------------------------------------------- + - name: Cache node modules + id: cache + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-cache-node-modules-${{ hashFiles('yarn.lock') }} + # comment out "restore-keys" if you need to rebuild yarn from 0 + restore-keys: | + ${{ runner.os }}-cache-node-modules- + #---------------------------------------------- # setup node #---------------------------------------------- - name: Setup node @@ -30,13 +42,11 @@ jobs: # https://stackoverflow.com/questions/61010294/how-to-cache-yarn-packages-in-github-actions cache: yarn #---------------------------------------------- - # cache node modules + # install deps if cache missing #---------------------------------------------- - - name: Cache node modules - uses: actions/cache@v3 - with: - path: node_modules - key: ${{ runner.os }}-cache-node-modules-${{ hashFiles('yarn.lock') }} + - name: yarn install + if: steps.cache.outputs.cache-hit != 'true' + run: yarn install --pure-lockfile #---------------------------------------------- # build trading #----------------------------------------------