Skip to content

Commit f9218ef

Browse files
committed
fix ci
1 parent 34357d0 commit f9218ef

File tree

4 files changed

+73
-32
lines changed

4 files changed

+73
-32
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'Setup Node.js and pnpm'
2+
description: 'Setup Node.js and pnpm with caching'
3+
inputs:
4+
node-version:
5+
description: 'Node.js version to use'
6+
required: false
7+
default: '22.18.0'
8+
pnpm-version:
9+
description: 'pnpm version to use'
10+
required: false
11+
default: '10.14.0'
12+
13+
runs:
14+
using: 'composite'
15+
steps:
16+
- name: Setup PNPM
17+
uses: pnpm/action-setup@v4
18+
with:
19+
version: ${{ inputs.pnpm-version }}
20+
run_install: false
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ inputs.node-version }}
26+
cache: 'pnpm'
27+
28+
- name: Install dependencies
29+
shell: bash
30+
run: pnpm install --frozen-lockfile

.github/workflows/build.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,10 @@ env:
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13-
1413
steps:
15-
- uses: actions/checkout@v3
16-
17-
# Read Node version from .nvmrc
18-
- name: Read Node version from .nvmrc
19-
id: nvm
20-
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
21-
22-
# Setup Node.js with the version from .nvmrc
23-
- name: Use Node.js version from .nvmrc
24-
uses: actions/setup-node@v3
25-
with:
26-
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
27-
28-
- name: Setup PNPM
29-
uses: pnpm/[email protected]
14+
- uses: actions/checkout@v4
3015

31-
- run: pnpm install --frozen-lockfile
16+
- name: Setup Node.js and pnpm
17+
uses: ./.github/actions/setup-node-pnpm
3218

33-
- run: pnpm run build
19+
- run: pnpm run build

.github/workflows/e2e-tests.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,11 @@ jobs:
1010
test:
1111
timeout-minutes: 30
1212
runs-on: ubuntu-latest
13-
1413
steps:
1514
- uses: actions/checkout@v4
1615

17-
- uses: actions/setup-node@v4
18-
with:
19-
node-version: "22.x"
20-
cache: "pnpm"
21-
22-
- name: Install pnpm
23-
uses: pnpm/action-setup@v4
24-
with:
25-
version: 10.14.0
26-
27-
- name: Install dependencies
28-
run: pnpm install --frozen-lockfile
16+
- name: Setup Node.js and pnpm
17+
uses: ./.github/actions/setup-node-pnpm
2918

3019
- name: Build application
3120
run: pnpm run build
@@ -42,4 +31,4 @@ jobs:
4231
with:
4332
name: playwright-report
4433
path: playwright-report/
45-
retention-days: 30
34+
retention-days: 30
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Setup Node.js and pnpm
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
node-version:
7+
description: 'Node.js version to use'
8+
required: false
9+
type: string
10+
default: '22.18.0'
11+
pnpm-version:
12+
description: 'pnpm version to use'
13+
required: false
14+
type: string
15+
default: '10.14.0'
16+
17+
jobs:
18+
setup:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup PNPM
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: ${{ inputs.pnpm-version }}
27+
run_install: false
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ inputs.node-version }}
33+
cache: 'pnpm'
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile

0 commit comments

Comments
 (0)