@@ -12,13 +12,37 @@ jobs:
1212 uses : pnpm/action-setup@v2
1313 with :
1414 version : 8
15+ - name : Setup Node
16+ uses : actions/setup-node@v3
17+ with :
18+ node-version-file : ' ./web/.node-version'
19+ - name : Cache Cypress binary
20+ id : cache-cypress
21+ uses : actions/cache@v3
22+ with :
23+ path : ~/.cache/Cypress
24+ key : ${{ runner.os }}-cypress-${{ hashFiles('./web/pnpm-lock.yaml') }}
25+ - name : Restore node_modules for web
26+ id : cache-web
27+ uses : actions/cache@v3
28+ with :
29+ path : web/node_modules
30+ key : ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
31+ - name : Install web dependencies
32+ if : steps.cache-web.outputs.cache-hit != 'true'
33+ run : pnpm install --frozen-lockfile
34+ working-directory : ./web
35+ - name : Install Cypress binary
36+ if : steps.cache-cypress.outputs.cache-hit != 'true'
37+ run : pnpm exec cypress install
38+ working-directory : ./web
1539 - name : Cypress run component tests
1640 uses : cypress-io/github-action@v6
1741 env :
1842 TZ : Europe/Copenhagen
1943 with :
2044 working-directory : ./web
21- install : true
45+ install : false
2246 # to run component tests we need to use "component: true"
2347 component : true
2448 - name : Upload screenshots
@@ -38,12 +62,37 @@ jobs:
3862 uses : pnpm/action-setup@v2
3963 with :
4064 version : 8
65+ - name : Setup Node
66+ uses : actions/setup-node@v3
67+ with :
68+ node-version-file : ' ./web/.node-version'
69+ - name : Cache Cypress binary
70+ id : cache-cypress
71+ uses : actions/cache@v3
72+ with :
73+ path : ~/.cache/Cypress
74+ key : ${{ runner.os }}-cypress-${{ hashFiles('./web/pnpm-lock.yaml') }}
75+ - name : Restore node_modules for web
76+ id : cache-web
77+ uses : actions/cache@v3
78+ with :
79+ path : web/node_modules
80+ key : ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
81+ - name : Install web dependencies
82+ if : steps.cache-web.outputs.cache-hit != 'true'
83+ run : pnpm install --frozen-lockfile
84+ working-directory : ./web
85+ - name : Install Cypress binary
86+ if : steps.cache-cypress.outputs.cache-hit != 'true'
87+ run : pnpm exec cypress install
88+ working-directory : ./web
4189 - name : Cypress run e2e tests
4290 uses : cypress-io/github-action@v6
4391 env :
4492 TZ : Europe/Copenhagen
4593 with :
4694 working-directory : ./web
95+ install : false
4796 build : pnpm run build --mode testing
4897 start : pnpm run preview
4998 config : baseUrl=http://127.0.0.1:4173/
0 commit comments