Skip to content

Commit 792591d

Browse files
test(promote): match the concurrency group for runs off main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
1 parent a1984f9 commit 792591d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/promote-workflow.test.mjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function runMove(plan, { latest = {}, missing = [], failing = [] } = {}) {
8686
// The npm config line refers to the token through the shell's variable syntax.
8787
const TOKEN_REFERENCE = "$" + "{NODE_AUTH_TOKEN}";
8888
const DRY_RUN_GROUP =
89-
/inputs\.dry-run && format\('npm-promote-dry-run-\{0\}', github\.run_id\) \|\| 'npm-promote'/;
89+
/^\$\{\{ \(inputs\.dry-run \|\| github\.ref != 'refs\/heads\/main'\) && format\('npm-promote-dry-run-\{0\}', github\.run_id\) \|\| 'npm-promote' \}\}$/;
9090
const ON_MAIN = /refs\/heads\/main/;
9191
const NOT_DRY_RUN = /!inputs\.dry-run/;
9292
const NOT_ON_REGISTRY = /prisma@8\.1\.0 is not on the registry/;
@@ -116,7 +116,7 @@ describe("promote.yml", () => {
116116
});
117117

118118
describe("concurrency", () => {
119-
it("gives a dry run its own group, so it cannot replace a waiting real promotion", () => {
119+
it("gives every run but a real one from main its own group, so it cannot replace a waiting real promotion", () => {
120120
assert.match(workflow.concurrency.group, DRY_RUN_GROUP);
121121
assert.equal(workflow.concurrency["cancel-in-progress"], false);
122122
});

0 commit comments

Comments
 (0)