Skip to content

Commit a909544

Browse files
committed
fix: fix message-buffer CI job to run correct prettier version
1 parent 504d0b3 commit a909544

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/ci-message-buffer.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,24 @@ jobs:
3838
run: |
3939
sudo apt-get install g++-12
4040
echo "CXX=/usr/bin/g++-12" >> "${GITHUB_ENV}"
41+
- uses: actions/setup-node@v4
42+
with:
43+
node-version-file: "package.json"
4144
# Libusb is a build requirement for the node-hid package and so pnpm
4245
# install will fail if this isn't in the build environment and if a
4346
# precompiled binary isn't found.
4447
- name: Install libusb
4548
run: sudo apt install -y libusb-1.0-0-dev libudev-dev
4649
- uses: pnpm/action-setup@v4
4750
name: Install pnpm
48-
- name: Install prettier globally
49-
run: pnpm install -g prettier@2.7.1
51+
with:
52+
run_install: true
5053
- name: Build and generate IDLs
5154
run: anchor build
5255
- name: Copy anchor target files
5356
run: cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/
54-
- name: Run prettier (to avoid pre-commit failures)
55-
run: |
56-
pnpm dlx prettier@2.7.1 --write "./idl/*"
57+
- name: Fix formatting (to avoid pre-commit failures)
58+
run: pnpm turbo --filter message_buffer fix:format
5759
- name: Check IDL changes
5860
# Fails if the IDL files are not up to date. Please use anchor build to regenerate the IDL files for
5961
# the current version of the contract and update idl directory.

0 commit comments

Comments
 (0)