Skip to content

Commit f1ca39f

Browse files
Erick Cardenas MendezMathilde Daugy
authored andcommitted
Set Node to v20 (#6055)
* fix: set front-end to Node v20, fix use of ts-node * fix: Cypress CI workflow now uses required Node version and dependencies cache * fix: Add install=false for cypress-io/github-action * fix: in CI workflow, install and cache Cypress binary * docs: add JSDoc description to register-tsNodeESM.js file
1 parent 508eec4 commit f1ca39f

File tree

14 files changed

+81
-22
lines changed

14 files changed

+81
-22
lines changed

.github/workflows/cypress.yml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/

.github/workflows/deploy-preview-branch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
uses: pnpm/action-setup@v2
2222
with:
2323
version: 8
24-
- name: Setup Node v18.x
24+
- name: Setup Node
2525
uses: actions/setup-node@v3
2626
with:
27-
node-version: 18
27+
node-version-file: './web/.node-version'
2828
- name: Restore node_modules for web
2929
id: cache-web
3030
uses: actions/cache@v3

.github/workflows/deploy-staging.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
uses: pnpm/action-setup@v2
1818
with:
1919
version: 8
20-
- name: Setup Node v18.x
20+
- name: Setup Node
2121
uses: actions/setup-node@v3
2222
with:
23-
node-version: 18
23+
node-version-file: './web/.node-version'
2424
- name: Restore node_modules for web
2525
id: cache-web
2626
uses: actions/cache@v3

.github/workflows/eslint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
uses: pnpm/action-setup@v2
2222
with:
2323
version: 8
24-
- name: Setup Node v18.x
24+
- name: Setup Node
2525
uses: actions/setup-node@v3
2626
with:
27-
node-version: 18
27+
node-version-file: './web/.node-version'
2828
- name: Restore node_modules for web
2929
id: cache-web
3030
uses: actions/cache@v3

.github/workflows/jsonlint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v4
14-
- name: Setup Node LTS
14+
- name: Setup Node
1515
uses: actions/setup-node@v3
1616
with:
17-
node-version: 18
17+
node-version-file: './web/.node-version'
1818
- name: Install jsonlint-mod
1919
run: |
2020
npm install -g jsonlint-mod

.github/workflows/prettier.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
uses: pnpm/action-setup@v2
1616
with:
1717
version: 8
18-
- name: Setup Node v18.x
18+
- name: Setup Node
1919
uses: actions/setup-node@v3
2020
with:
21-
node-version: 18
21+
node-version-file: './web/.node-version'
2222
- name: Restore node_modules for web
2323
id: cache-web
2424
uses: actions/cache@v3

.github/workflows/typecheck.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
uses: pnpm/action-setup@v2
1717
with:
1818
version: 8
19-
- name: Setup Node v18.x
19+
- name: Setup Node
2020
uses: actions/setup-node@v3
2121
with:
22-
node-version: 18
22+
node-version-file: './web/.node-version'
2323
- name: Restore node_modules for web
2424
id: cache-web
2525
uses: actions/cache@v3

.github/workflows/unit_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
uses: pnpm/action-setup@v2
1717
with:
1818
version: 8
19-
- name: Setup Node v18.x
19+
- name: Setup Node
2020
uses: actions/setup-node@v3
2121
with:
22-
node-version: 18
22+
node-version-file: './web/.node-version'
2323
- name: Restore node_modules for web
2424
id: cache-web
2525
uses: actions/cache@v3

.github/workflows/validate_generate_files.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
uses: pnpm/action-setup@v2
1717
with:
1818
version: 8
19-
- name: Setup Node v18.x
19+
- name: Setup Node
2020
uses: actions/setup-node@v3
2121
with:
22-
node-version: 18
22+
node-version-file: './web/.node-version'
2323
- name: Restore node_modules for web
2424
id: cache-web
2525
uses: actions/cache@v3

.github/workflows/validate_generated_files.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
uses: pnpm/action-setup@v2
1717
with:
1818
version: 8
19-
- name: Setup Node v18.x
19+
- name: Setup Node
2020
uses: actions/setup-node@v3
2121
with:
22-
node-version: 18
22+
node-version-file: './web/.node-version'
2323
- name: Restore node_modules
2424
id: cache
2525
uses: actions/cache@v3

0 commit comments

Comments
 (0)