Skip to content

Commit aafd4e5

Browse files
committed
feat(ci): added cypress binaries cache to e2e github actions
1 parent 20ee687 commit aafd4e5

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/e2e.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ jobs:
4040
- name: Installing dependencies
4141
if: steps.admin-node_modules-cache.outputs.cache-hit != 'true'
4242
run: npm ci
43+
- name: Get Cypress version
44+
run: echo "CYPRESS_VERSION=`npm list | grep 'cypress'|sed 's/.*cypress@//'`" >> $GITHUB_ENV
45+
- name: Cypress Binaries cache
46+
id: cypress-cache
47+
uses: actions/cache@v4
48+
with:
49+
path: |
50+
~/.cache/Cypress
51+
key: cypress-${{ env.CYPRESS_VERSION }}
52+
- name: Install Cypress binaries
53+
if: steps.cypress-cache.outputs.cache-hit != 'true'
54+
run: npx cypress install
4355
- name: Build
4456
run: npm run build
4557
- name: Running Test
@@ -66,6 +78,18 @@ jobs:
6678
- name: Installing dependencies
6779
if: steps.candidate-node_modules-cache.outputs.cache-hit != 'true'
6880
run: npm ci
81+
- name: Get Cypress version
82+
run: echo "CYPRESS_VERSION=`npm list | grep 'cypress'|sed 's/.*cypress@//'`" >> $GITHUB_ENV
83+
- name: Cypress Binaries cache
84+
id: cypress-cache
85+
uses: actions/cache@v4
86+
with:
87+
path: |
88+
~/.cache/Cypress
89+
key: cypress-${{ env.CYPRESS_VERSION }}
90+
- name: Install Cypress binaries
91+
if: steps.cypress-cache.outputs.cache-hit != 'true'
92+
run: npx cypress install
6993
- name: Build
7094
run: npm run build
7195
- name: Running Test

0 commit comments

Comments
 (0)