Skip to content

Commit

Permalink
refactor: dont share node_modules between baseline and current repos
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov committed Oct 3, 2024
1 parent 39ff5c7 commit 4a75009
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,25 @@ jobs:
path: ${{ env.CYPRESS_BASELINE_REPO }}
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
id: node

- 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/[email protected]
id: baseline_cache
with:
path: ${{ env.CYPRESS_BASELINE_REPO }}/node_modules
# TODO: replace with ${{ steps.node.outputs.node-version }}
key:
"${{ runner.os }}-node-20.x__${{ hashFiles(format('{0}/package-lock.json', env.CYPRESS_BASELINE_REPO)) }}"

- name: Install dependencies for baseline state
if: steps.baseline_cache.outputs.cache-hit != 'true'
run: cd ${{ env.CYPRESS_BASELINE_REPO }} && npm i --workspaces --include-workspace-root

- name: Run tests for baseline state
run: |
tree -d -L 1
tree -d ${{ env.CYPRESS_BASELINE_REPO }} -L 1
cd ${{ env.CYPRESS_BASELINE_REPO }}
npx nx component-test demo-cypress
cd ../
Expand Down

0 comments on commit 4a75009

Please sign in to comment.