From eb9c1e5a59381c9d39229a9d9a11d64e23a55180 Mon Sep 17 00:00:00 2001 From: Nikita Barsukov Date: Thu, 3 Oct 2024 12:01:26 +0300 Subject: [PATCH] refactor: dont share `node_modules` between baseline and current repos --- .github/workflows/e2e.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3716750c9ae45..4efb80bc70aac 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -42,11 +42,16 @@ jobs: - uses: taiga-family/ci/actions/setup/variables@v1.93.0 - uses: taiga-family/ci/actions/setup/node@v1.93.0 - - name: Share node_modules between current and baseline repos - run: | - cp -r node_modules ${{ env.CYPRESS_BASELINE_REPO }}/node_modules - tree -d -L 1 - tree -d ${{ env.CYPRESS_BASELINE_REPO }} -L 1 + - name: Restore cache for baseline + uses: actions/cache/restore@v4.0.2 + id: baseline_cache + with: + path: ${{ env.CYPRESS_BASELINE_REPO }}/node_modules + key: "${{ runner.os }}-node-${{ inputs.node-version }}__${{ hashFiles('baseline/package-lock.json') }}" + + - name: Install Dependencies + if: steps.baseline_cache.outputs.cache-hit != 'true' + run: npm i --workspaces --include-workspace-root - name: Run tests for baseline state run: |