@rightkit/ci 0.2.43 → 0.2.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/ci",
3
- "version": "0.2.43",
3
+ "version": "0.2.45",
4
4
  "description": "Public-repo-only GitHub Actions workflow layer: templates, visibility gate, sync/drift/adopt/uninstall for right-git.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",
@@ -24,9 +24,6 @@
24
24
  "*.json"
25
25
  ],
26
26
  "sideEffects": false,
27
- "scripts": {
28
- "test": "node --test *.test.mjs"
29
- },
30
27
  "publishConfig": {
31
28
  "registry": "https://registry.npmjs.org/",
32
29
  "access": "public"
@@ -36,5 +33,7 @@
36
33
  "url": "git+https://github.com/Orthic-Labs/rightkit.git",
37
34
  "directory": "packages/ci"
38
35
  },
39
- "packageManager": "pnpm@11.24.0"
40
- }
36
+ "scripts": {
37
+ "test": "node --test *.test.mjs"
38
+ }
39
+ }
package/render.test.mjs CHANGED
@@ -180,6 +180,11 @@ test("rust-hybrid release candidate renders product scripts, artifact handoff, a
180
180
  assert.match(content, /pnpm run ci:candidate-check/);
181
181
  assert.match(content, /pnpm run release:admit/);
182
182
  assert.match(content, /pnpm run release:stage-summary/);
183
+ // Ownership approval supports only macOS and Windows: the admission job (which runs the ownership step) never renders on Linux.
184
+ const admission = content.match(/^ {2}admission:\n([\s\S]*?)^ {2}\S/m)?.[1] ?? "";
185
+ assert.match(admission, /RightKit ownership/);
186
+ assert.match(admission, /runs-on: macos-15\n/);
187
+ assert.doesNotMatch(admission, /runs-on: ubuntu|runs-on: \$\{\{[^}]*linux/i);
183
188
  assert.match(content, /Mozilla-Actions\/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba/);
184
189
  assert.match(content, /shared-key: widgets-rust/);
185
190
  assert.doesNotMatch(content, /bash \.\/scripts\/gate\.sh/);
@@ -1488,10 +1493,11 @@ const SW_BASELINE = {
1488
1493
  "node/publish-npm": "50882207659dfb6e0207fc0d9b33d86b7c10a2d2e3e6c65b2db05d5261982834",
1489
1494
  "node/publish-package-managers": "106b8d28ed76d916afe68808388cd5dc0de0ddd719b566832a6e8280410f9d7f",
1490
1495
  "rust-hybrid/ci": "9652939dae20655f893694e6ef59b521c1c8805817a9048f1347e128ffa5cefb",
1491
- "rust-hybrid/release-candidate": "a0405dd2d6df8cfe2909fe8b371a068838617174e0d591b367b9dc5866400348",
1492
- "rust-hybrid/regenerate": "14b7adfb5839df53f53bfe9599ef1358ff51d160a21b9ce1ca5d843a87156b36",
1496
+ // 0.2.44/0.2.45: the 0.2.41 render with the admission and regenerate jobs on macos-15 (ownership approval does not run on Linux).
1497
+ "rust-hybrid/release-candidate": "2a8b8acb5844c244e220f996aac22d35cdd7df1dc9a83e88a9ca71cb80c6e208",
1498
+ "rust-hybrid/regenerate": "88763b9254bb94d893d927e8d8b7458b57afee36f27d618df4b36e8c8ca55842",
1493
1499
  "rust-hybrid-chain/ci": "413071a268dfa3b72a5b483173551f5e56818ed60f0cd6b15cd5a730584d8a6e",
1494
- "rust-hybrid-chain/release-candidate": "0dc667ce2c399f87b962d31752980b87eb83b3becc9c05ca076ecdf6a0fc7b02",
1500
+ "rust-hybrid-chain/release-candidate": "56faea1858944a9bf92f93370ec4a26d3c3360b2adc17588f6c6a93f1875546e",
1495
1501
  };
1496
1502
 
1497
1503
  // Each lane that builds Swift renders the shared configure and cleanup steps into exactly these jobs.
@@ -1720,3 +1726,17 @@ test("node release-candidate ownership step passes on both triggers and fails on
1720
1726
  fs.rmSync(scratch, { recursive: true, force: true });
1721
1727
  }
1722
1728
  });
1729
+
1730
+ test("rust-hybrid: no job that runs the ownership step is hard-coded to a Linux runner", () => {
1731
+ const rendered = [];
1732
+ const candidate = { ...FULL_MANIFEST, lanes: ["ci", "release-candidate", "regenerate"], profile: "rust-hybrid", gate: { path: "scripts/gate.sh" }, regenerate: { script: "regenerate" }, candidate: { buildScript: "ci:candidate", checkScript: "ci:candidate-check", admissionScript: "release:admit", stageSummaryScript: "release:stage-summary", artifactRoot: "widgets-unsigned", os: ["macos-latest", "windows-latest"] }, templateVersion: "1.2.0" };
1733
+ for (const [lane, template] of [["ci", "ci.yml"], ["release-candidate", "release-candidate.yml"], ["regenerate", "regenerate.yml"]]) {
1734
+ const content = renderTemplate(fs.readFileSync(path.join(templatesDir, "profiles/rust-hybrid", template), "utf8"), buildRenderContext(candidate, "/repos/widgets", lane));
1735
+ const jobs = content.split(/^jobs:\n/m)[1].split(/^ {2}(?=[a-z][\w-]*:\n)/m).filter(Boolean);
1736
+ for (const job of jobs.filter((j) => /RightKit ownership/.test(j))) {
1737
+ rendered.push(`${lane}/${job.split(":")[0]}`);
1738
+ assert.doesNotMatch(job, /runs-on: ubuntu|runs-on: \$\{\{[^}]*(ubuntu|linux)/i, `${lane}: a job with the ownership step must not run on Linux`);
1739
+ }
1740
+ }
1741
+ assert.deepEqual(rendered.sort(), ["ci/ci", "regenerate/regenerate", "release-candidate/admission"]);
1742
+ });
@@ -24,7 +24,8 @@ jobs:
24
24
  regenerate:
25
25
  needs: [private-repo-guard]
26
26
  if: ${{ github.event_name == 'workflow_dispatch' }}
27
- runs-on: ubuntu-24.04
27
+ # The ownership step below supports only macOS and Windows runners; Linux fails "unsupported platform: linux".
28
+ runs-on: macos-15
28
29
  timeout-minutes: 60
29
30
  permissions:
30
31
  contents: write
@@ -42,7 +42,8 @@ jobs:
42
42
  run: exit 1
43
43
  admission:
44
44
  needs: [private-repo-guard]
45
- runs-on: ubuntu-24.04
45
+ # Ownership approval supports only macOS and Windows; Linux fails "unsupported platform: linux".
46
+ runs-on: macos-15
46
47
  permissions:
47
48
  contents: read
48
49
  outputs: