From 9a08070262fa7bddd445610da49f86d123a02efc Mon Sep 17 00:00:00 2001 From: trevor-signal <131492920+trevor-signal@users.noreply.github.com> Date: Fri, 8 Dec 2023 19:56:44 -0500 Subject: [PATCH] Cache node_modules in stories CI action --- .github/workflows/stories.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stories.yml b/.github/workflows/stories.yml index b96b476c98..3c9090a6bc 100644 --- a/.github/workflows/stories.yml +++ b/.github/workflows/stories.yml @@ -18,6 +18,18 @@ jobs: with: node-version: '18.17.1' cache: 'yarn' - - run: yarn install --frozen-lockfile + - name: Cache Desktop node_modules + id: cache-desktop-modules + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} + - name: Install Desktop node_modules + if: steps.cache-desktop-modules.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile --prefer-offline + env: + CHILD_CONCURRENCY: 1 + NPM_CONFIG_LOGLEVEL: verbose - run: yarn build:storybook + - run: npx playwright install chromium - run: yarn run-p --race test:storybook:serve test:storybook:test