File tree Expand file tree Collapse file tree 3 files changed +52
-46
lines changed
Expand file tree Collapse file tree 3 files changed +52
-46
lines changed Original file line number Diff line number Diff line change 1+ name : Setup Node and pnpm
2+ description : Setup pnpm, Node.js, and install project dependencies
3+
4+ inputs :
5+ node-architecture :
6+ description : Optional Node.js architecture passed to actions/setup-node
7+ required : false
8+ default : " "
9+ registry-url :
10+ description : Optional npm registry URL passed to actions/setup-node
11+ required : false
12+ default : " "
13+ install-command :
14+ description : Command used to install project dependencies
15+ required : false
16+ default : npm_config_build_from_source=true pnpm install --frozen-lockfile
17+
18+ runs :
19+ using : composite
20+ steps :
21+ - name : Setup PNPM
22+ uses : pnpm/action-setup@v4
23+ with :
24+ version : 10.14.0
25+ run_install : false
26+
27+ - name : Setup NodeJS
28+ uses : actions/setup-node@v6
29+ with :
30+ node-version-file : .nvmrc
31+ architecture : ${{ inputs.node-architecture }}
32+ cache : pnpm
33+ registry-url : ${{ inputs.registry-url }}
34+
35+ - name : Install Dependencies
36+ shell : bash
37+ run : ${{ inputs.install-command }}
Original file line number Diff line number Diff line change @@ -30,19 +30,11 @@ jobs:
3030 lfs : true
3131 fetch-depth : 0
3232
33- - name : Setup NodeJS
34- uses : actions/setup-node@v6
33+ - name : Setup Project
34+ uses : ./.github/ actions/setup-node-pnpm
3535 with :
36- node-version-file : .nvmrc
37- cache : pnpm
3836 registry-url : https://registry.npmjs.org
3937
40- - name : Install PNPM
41- run : npm i pnpm@10 -g
42-
43- - name : Install Dependencies
44- run : npm_config_build_from_source=true pnpm install --frozen-lockfile
45-
4638 - name : Verify
4739 run : pnpm test
4840
@@ -139,16 +131,19 @@ jobs:
139131 # lfs: true
140132 # fetch-depth: 0
141133 #
134+ # - name: Setup PNPM
135+ # uses: pnpm/action-setup@v4
136+ # with:
137+ # version: 10.14.0
138+ # run_install: false
139+ #
142140 # - name: Setup NodeJS
143141 # uses: actions/setup-node@v6
144142 # with:
145143 # node-version-file: .nvmrc
146144 # architecture: ${{ matrix.node_arch }}
147145 # cache: pnpm
148146 #
149- # - name: Install PNPM
150- # run: npm i pnpm@10 -g
151- #
152147 # - name: Install Linux dependencies
153148 # if: ${{ runner.os == 'Linux' }}
154149 # run: sudo apt-get update && sudo apt-get install -y libgtk2.0-0 libgtk-3-dev libxtst6 libxss1 libnss3 libasound2 xvfb
Original file line number Diff line number Diff line change @@ -40,21 +40,12 @@ jobs:
4040 persist-credentials : false
4141 fetch-depth : 0
4242
43- - name : Setup NodeJS
44- uses : actions/setup-node@v6
45- with :
46- node-version-file : .nvmrc
47- cache : pnpm
48-
49- - name : Install PNPM
50- run : npm i pnpm@10 -g
43+ - name : Setup Project
44+ uses : ./.github/actions/setup-node-pnpm
5145
5246 - name : Install Linux dependencies
5347 run : sudo apt-get update && sudo apt-get install -y libgtk2.0-0 libgtk-3-dev libxtst6 libxss1 libnss3 libasound2 xvfb
5448
55- - name : Install Dependencies
56- run : npm_config_build_from_source=true pnpm install --frozen-lockfile
57-
5849 - name : Build
5950 run : |
6051 GYP_ARGS=(
9889 persist-credentials : false
9990 fetch-depth : 0
10091
101- - name : Setup NodeJS
102- uses : actions/setup-node@v6
103- with :
104- node-version-file : .nvmrc
105- cache : pnpm
106-
107- - name : Install PNPM
108- run : npm i pnpm@10 -g
109-
110- - name : Install Dependencies
111- run : npm_config_build_from_source=true pnpm install --frozen-lockfile
92+ - name : Setup Project
93+ uses : ./.github/actions/setup-node-pnpm
11294
11395 - name : Build
11496 env :
@@ -158,18 +140,10 @@ jobs:
158140 persist-credentials : false
159141 fetch-depth : 0
160142
161- - name : Setup NodeJS
162- uses : actions/setup-node@v6
143+ - name : Setup Project
144+ uses : ./.github/ actions/setup-node-pnpm
163145 with :
164- node-version-file : .nvmrc
165- architecture : ${{ matrix.node_arch }}
166- cache : pnpm
167-
168- - name : Install PNPM
169- run : npm i pnpm@10 -g
170-
171- - name : Install Dependencies
172- run : npm_config_build_from_source=true pnpm install --frozen-lockfile
146+ node-architecture : ${{ matrix.node_arch }}
173147
174148 - name : Build
175149 env :
You can’t perform that action at this time.
0 commit comments