Переглянути джерело

fix: fix message-buffer CI job to run correct prettier version

Connor Prussin 8 місяців тому
батько
коміт
a9095442ee
1 змінених файлів з 7 додано та 5 видалено
  1. 7 5
      .github/workflows/ci-message-buffer.yml

+ 7 - 5
.github/workflows/ci-message-buffer.yml

@@ -38,6 +38,9 @@ jobs:
         run: |
           sudo apt-get install g++-12
           echo "CXX=/usr/bin/g++-12" >> "${GITHUB_ENV}"
+      - uses: actions/setup-node@v4
+        with:
+          node-version-file: "package.json"
       # Libusb is a build requirement for the node-hid package and so pnpm
       # install will fail if this isn't in the build environment and if a
       # precompiled binary isn't found.
@@ -45,15 +48,14 @@ jobs:
         run: sudo apt install -y libusb-1.0-0-dev libudev-dev
       - uses: pnpm/action-setup@v4
         name: Install pnpm
-      - name: Install prettier globally
-        run: pnpm install -g prettier@2.7.1
+        with:
+          run_install: true
       - name: Build and generate IDLs
         run: anchor build
       - name: Copy anchor target files
         run: cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/
-      - name: Run prettier (to avoid pre-commit failures)
-        run: |
-          pnpm dlx prettier@2.7.1 --write "./idl/*"
+      - name: Fix formatting (to avoid pre-commit failures)
+        run: pnpm turbo --filter message_buffer fix:format
       - name: Check IDL changes
         # Fails if the IDL files are not up to date. Please use anchor build to regenerate the IDL files for
         # the current version of the contract and update idl directory.