From 25c2183be043bb5b21e0f6feaeb1946a01166413 Mon Sep 17 00:00:00 2001 From: qupig <61939856+qupig@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:13:22 +0000 Subject: [PATCH] ci: fix prettier check job Use prettier version specified in `package.json` instead of fixed versions from third-party workflows. --- .github/workflows/build.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 67969af29..337b55ba6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,17 +23,25 @@ concurrency: jobs: prettier: - name: Format with Prettier + name: Run prettier check runs-on: ubuntu-22.04 timeout-minutes: 5 steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Run prettier with actionsx/prettier - uses: actionsx/prettier@v3 + - name: Install Node.js + uses: actions/setup-node@v4 with: - args: --check --log-level=warn . + node-version-file: .node-version + cache: npm + cache-dependency-path: | + package-lock.json + test/package-lock.json + + - run: SKIP_SUBMODULE_DEPS=1 npm ci + + - run: npx prettier --check . doctoc: name: Doctoc markdown files