@rightkit/git 0.2.19 → 0.2.21
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
package/render.test.mjs
CHANGED
|
@@ -51,11 +51,19 @@ test("rust-hybrid ci renders its pinned package manager and gate", () => {
|
|
|
51
51
|
assert.match(content, /version: 11\.24\.0/);
|
|
52
52
|
assert.match(content, /components: rustfmt, clippy/);
|
|
53
53
|
assert.doesNotMatch(content, /toolchain:/);
|
|
54
|
+
assert.match(content, /group: \$\{\{ github\.workflow \}\}-\$\{\{ github\.ref \}\}/);
|
|
55
|
+
assert.match(content, /cancel-in-progress: true/);
|
|
54
56
|
assert.match(content, /bash \.\/scripts\/gate\.sh/);
|
|
55
57
|
assert.match(content, /os: \["windows-latest"\]/);
|
|
56
58
|
assert.doesNotMatch(content, /ubuntu-latest|macos-latest/);
|
|
57
59
|
});
|
|
58
60
|
|
|
61
|
+
test("ordinary CI templates cancel superseded runs on the same ref", () => {
|
|
62
|
+
const generic = renderAllLanes(FULL_MANIFEST, "/repos/widgets").ci;
|
|
63
|
+
assert.match(generic, /group: \$\{\{ github\.workflow \}\}-\$\{\{ github\.ref \}\}/);
|
|
64
|
+
assert.match(generic, /cancel-in-progress: true/);
|
|
65
|
+
});
|
|
66
|
+
|
|
59
67
|
test("rust-hybrid ci preserves a declared macOS-only lane", () => {
|
|
60
68
|
const manifest = {
|
|
61
69
|
...FULL_MANIFEST,
|
|
@@ -114,6 +122,7 @@ test("rust-hybrid cache contract renders every declared Cargo workspace", () =>
|
|
|
114
122
|
assert.match(content, /workspaces: \|\n \. -> target\n apps\/studio\/src-tauri -> target/);
|
|
115
123
|
assert.match(content, /add-job-id-key: false/);
|
|
116
124
|
assert.match(content, /cache-workspace-crates: false/);
|
|
125
|
+
assert.match(content, /cache-on-failure: true/);
|
|
117
126
|
assert.match(content, /RUSTC_WRAPPER: "sccache"/);
|
|
118
127
|
});
|
|
119
128
|
|
package/templates/ci.yml
CHANGED
|
@@ -7,6 +7,9 @@ on:
|
|
|
7
7
|
branches: [main]
|
|
8
8
|
permissions:
|
|
9
9
|
contents: read
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
10
13
|
# F5 fix: `private-repo-guard` carries no job-level `if`, so it always runs.
|
|
11
14
|
# Its one step's own `if` fires only when the repo is private, and `exit 1`
|
|
12
15
|
# then fails the JOB (loud, visible, non-zero) rather than the previous
|
|
@@ -7,6 +7,9 @@ on:
|
|
|
7
7
|
branches: [main]
|
|
8
8
|
permissions:
|
|
9
9
|
contents: read
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
10
13
|
jobs:
|
|
11
14
|
private-repo-guard:
|
|
12
15
|
runs-on: ubuntu-24.04
|
|
@@ -46,6 +49,7 @@ ${RUST_CACHE_WORKSPACES}
|
|
|
46
49
|
shared-key: ${ARTIFACT_PREFIX}-rust
|
|
47
50
|
add-job-id-key: false
|
|
48
51
|
cache-workspace-crates: false
|
|
52
|
+
cache-on-failure: true
|
|
49
53
|
save-if: ${{ github.event_name != 'pull_request' }}
|
|
50
54
|
- uses: Mozilla-Actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
|
|
51
55
|
with:
|
|
@@ -52,6 +52,7 @@ ${RUST_CACHE_WORKSPACES}
|
|
|
52
52
|
shared-key: ${ARTIFACT_PREFIX}-rust
|
|
53
53
|
add-job-id-key: false
|
|
54
54
|
cache-workspace-crates: false
|
|
55
|
+
cache-on-failure: true
|
|
55
56
|
save-if: true
|
|
56
57
|
- uses: Mozilla-Actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
|
|
57
58
|
with:
|