Skip to content

Commit c46e06f

Browse files
committed
chore: fmt ci uses correct node setup
Add flag for node setup to allow not installing all node_modules
1 parent 9a7705c commit c46e06f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/actions/setup-node/action.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: "Setup Node"
22
description: |
33
Sets up the node environment for tests, builds, etc.
4+
inputs:
5+
yarn-install-flags:
6+
description: "Flags to pass to yarn install"
7+
required: false
8+
default: ""
49
runs:
510
using: "composite"
611
steps:
@@ -12,4 +17,4 @@ runs:
1217
cache-dependency-path: "site/yarn.lock"
1318
- name: Install node_modules
1419
shell: bash
15-
run: ./scripts/yarn_install.sh
20+
run: ./scripts/yarn_install.sh ${{ inputs.yarn-install-flags }}

.github/workflows/ci.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,19 +192,18 @@ jobs:
192192
- name: Checkout
193193
uses: actions/checkout@v3
194194

195-
- uses: buildjet/setup-node@v3
195+
- uses: ./.github/actions/setup-node
196196
with:
197-
node-version: 16.16.0
197+
# Only install prettier dep for this job
198+
yarn-install-flags: "prettier"
199+
198200

199201
- uses: buildjet/setup-go@v4
200202
with:
201203
# This doesn't need caching. It's super fast anyways!
202204
cache: false
203205
go-version: 1.20.5
204206

205-
- name: Install prettier
206-
run: npm install -g prettier
207-
208207
- name: Install shfmt
209208
run: go install mvdan.cc/sh/v3/cmd/shfmt@v3.5.0
210209

0 commit comments

Comments
 (0)