Skip to content

Commit 8e0694c

Browse files
committed
fix(release): accept pnpm AUR test runner
1 parent f0e2671 commit 8e0694c

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,17 +1274,18 @@ jobs:
12741274
12751275
path = Path("PKGBUILD")
12761276
text = path.read_text(encoding="utf-8")
1277-
if " bun run test || :\n" in text:
1278-
print("PKGBUILD already uses bun run test")
1279-
elif " bun test || :\n" in text:
1277+
if " pnpm run test || :\n" in text:
1278+
print("PKGBUILD already uses pnpm run test")
1279+
elif " bun run test || :\n" in text or " bun test || :\n" in text:
12801280
text = text.replace(
12811281
" # Relax tests: 116 passed, 15 failed\n",
12821282
" # Run the desktop Vitest suite, but do not fail the package build on test failures.\n",
12831283
1,
12841284
)
1285-
text = text.replace(" bun test || :\n", " bun run test || :\n", 1)
1285+
text = text.replace(" bun run test || :\n", " pnpm run test || :\n", 1)
1286+
text = text.replace(" bun test || :\n", " pnpm run test || :\n", 1)
12861287
path.write_text(text, encoding="utf-8")
1287-
print("Updated PKGBUILD to use bun run test")
1288+
print("Updated PKGBUILD to use pnpm run test")
12881289
else:
12891290
raise SystemExit("Could not find the desktop test command in PKGBUILD")
12901291
PY

scripts/ci/validate-release-rc-workflow.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,17 @@ test("update-aur and update-aur-beta publish directly with a pre-push ownership
710710
);
711711
expect(pnpmCompatibilityStep.run).not.toMatch(/^\s*bun install/m);
712712
expect(pnpmCompatibilityStep.run).not.toContain("--force");
713+
const normalizeTestRunnerStep = sourceSteps.find(
714+
(step) => step.name === "Normalize desktop test runner for source package",
715+
);
716+
expect(normalizeTestRunnerStep).toBeDefined();
717+
expect(normalizeTestRunnerStep.run).toContain('" pnpm run test || :\\n"');
718+
expect(normalizeTestRunnerStep.run).toContain(
719+
'" bun run test || :\\n", " pnpm run test || :\\n"',
720+
);
721+
expect(normalizeTestRunnerStep.run).toContain(
722+
'" bun test || :\\n", " pnpm run test || :\\n"',
723+
);
713724
const sourcePushStep = sourceSteps.find((step) =>
714725
step.name.startsWith("Commit and push"),
715726
);

0 commit comments

Comments
 (0)