From 0531b30154dd84424af556483336e9eb65968b98 Mon Sep 17 00:00:00 2001 From: "sh1pt-actions-fleet[bot]" <287014002+sh1pt-actions-fleet[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 09:32:32 +0000 Subject: [PATCH 1/2] Add .github/workflows/test.yml via sh1pt node-pnpm-test@1.2.0 --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4b357ad --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +# Managed by sh1pt Actions Fleet +# pack: node-pnpm-test@1.2.0 +# install: sh1pt-actions-store +# hash: sha256:53499e840c5023f2235444afd4f6a36d2c0bf8a40c52cfdf84615b17624de69b +name: test + +on: + pull_request: + push: + branches: [master] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + + # pnpm version is read from the "packageManager" field in package.json. + # Do not pin a version here — it conflicts with packageManager and fails + # with ERR_PNPM_BAD_PM_VERSION. + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - run: pnpm install --frozen-lockfile + + # test defaults to `pnpm run --if-present test` so a repo that hasn't + # defined a test script yet gets a green workflow instead of failing on + # the first step. Once the script exists it runs normally. + - run: pnpm run --if-present test + env: + CI: true From 4d0a86259168dae83d2b937d5a1439405c495aee Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 10 Jul 2026 09:35:51 +0000 Subject: [PATCH 2/2] Fix test workflow: use Bun instead of pnpm This repo uses Bun (bun.lock), so pnpm/action-setup@v4 failed with "No pnpm version is specified" and pnpm install would have failed with no pnpm-lock.yaml. Swap to oven-sh/setup-bun + bun install --frozen-lockfile, with a jq guard so the missing test script skips green instead of erroring. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/test.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b357ad..920e2d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ # Managed by sh1pt Actions Fleet # pack: node-pnpm-test@1.2.0 # install: sh1pt-actions-store -# hash: sha256:53499e840c5023f2235444afd4f6a36d2c0bf8a40c52cfdf84615b17624de69b +# hash: sha256:hand-edited-for-bun-do-not-overwrite name: test on: @@ -19,21 +19,24 @@ jobs: steps: - uses: actions/checkout@v4 - # pnpm version is read from the "packageManager" field in package.json. - # Do not pin a version here — it conflicts with packageManager and fails - # with ERR_PNPM_BAD_PM_VERSION. - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v4 + # This repo uses Bun (see bun.lock), not pnpm. The stock sh1pt + # node-pnpm-test pack was adapted to Bun; the hash above is + # intentionally invalid so the fleet treats this as hand-edited and + # does not re-install the broken pnpm version. + - uses: oven-sh/setup-bun@v2 with: - node-version: 22 - cache: pnpm + bun-version: latest - - run: pnpm install --frozen-lockfile + - run: bun install --frozen-lockfile - # test defaults to `pnpm run --if-present test` so a repo that hasn't - # defined a test script yet gets a green workflow instead of failing on - # the first step. Once the script exists it runs normally. - - run: pnpm run --if-present test + # Defaults to a no-op when no "test" script exists yet, so a repo that + # hasn't defined tests gets a green workflow instead of a hard failure. + - name: Run tests if present + run: | + if jq -e '.scripts.test' package.json >/dev/null; then + bun run test + else + echo 'No "test" script defined — skipping.' + fi env: CI: true