code-foundry 0.32.4 → 0.34.0
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/.github/CONTRIBUTING.md +17 -14
- package/.github/workflows/ci.yml +25 -8
- package/.github/workflows/codeql.yml +28 -14
- package/.github/workflows/draft-pr.yml +25 -18
- package/.github/workflows/draft-pr_self-ci.yml +3 -1
- package/.github/workflows/opencode-security_self-ci.yml +4 -2
- package/.github/workflows/release-pr.yml +31 -9
- package/.github/workflows/release-pr_self-ci.yml +4 -7
- package/.github/workflows/release.yml +136 -23
- package/.github/workflows/release_self-ci.yml +5 -1
- package/.github/workflows/security.yml +18 -11
- package/.github/workflows/test.yml +28 -9
- package/.github/workflows/validation.yml +183 -0
- package/.github/workflows/validation_self-ci.yml +82 -0
- package/CHANGELOG.md +25 -0
- package/README.md +7 -4
- package/docs/CONFIGURATION.md +2 -1
- package/docs/RELEASES.md +26 -18
- package/docs/WORKFLOWS.md +56 -4
- package/package.json +1 -1
- package/src/commands/doctor.mjs +53 -3
- package/src/commands/release.mjs +290 -68
- package/src/commands/sync.mjs +88 -4
- package/src/lib/github-doctor.mjs +10 -4
- package/src/lib/release-policy.mjs +88 -19
- package/src/lib/validation-policy.mjs +127 -0
- package/src/runtime.mjs +54 -0
- package/.github/workflows/ci_self-ci.yml +0 -21
- package/.github/workflows/codeql_self-ci.yml +0 -29
- package/.github/workflows/security_self-ci.yml +0 -21
- package/.github/workflows/test_self-ci.yml +0 -22
|
@@ -18,6 +18,15 @@ on:
|
|
|
18
18
|
required: false
|
|
19
19
|
type: string
|
|
20
20
|
default: v0.31.12
|
|
21
|
+
secrets:
|
|
22
|
+
CODE_FOUNDRY_TOKEN:
|
|
23
|
+
required: false
|
|
24
|
+
RELEASE_PLEASE_TOKEN:
|
|
25
|
+
required: false
|
|
26
|
+
STAGING_DEPLOY_KEY:
|
|
27
|
+
required: false
|
|
28
|
+
NPM_TOKEN:
|
|
29
|
+
required: false
|
|
21
30
|
|
|
22
31
|
permissions:
|
|
23
32
|
actions: write
|
|
@@ -47,12 +56,14 @@ jobs:
|
|
|
47
56
|
npm_publish: ${{ steps.profile.outputs.npm_publish }}
|
|
48
57
|
steps:
|
|
49
58
|
- name: Checkout
|
|
50
|
-
uses: actions/checkout@v7
|
|
59
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
51
60
|
with:
|
|
61
|
+
persist-credentials: false
|
|
52
62
|
filter: blob:none
|
|
53
63
|
- name: Checkout runtime
|
|
54
|
-
uses: actions/checkout@v7
|
|
64
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
55
65
|
with:
|
|
66
|
+
persist-credentials: false
|
|
56
67
|
repository: ${{ inputs.runtime-repository }}
|
|
57
68
|
ref: ${{ inputs.runtime-ref }}
|
|
58
69
|
path: .github/.code-foundry
|
|
@@ -72,12 +83,18 @@ jobs:
|
|
|
72
83
|
: {}
|
|
73
84
|
let releaseType = config.release_type || 'auto'
|
|
74
85
|
let npmPublish = config.npm_publish || 'false'
|
|
75
|
-
|
|
86
|
+
// The merge audit topology requires squash for Release Please version
|
|
87
|
+
// pull requests into main. Release automation never defaults to a
|
|
88
|
+
// merge method: an unset or non-squash release_merge_strategy fails
|
|
89
|
+
// the release job before any pull request is created or merged.
|
|
90
|
+
const releaseMergeStrategy = String(config.release_merge_strategy || '').trim().toLowerCase()
|
|
76
91
|
if (releaseType === 'auto') {
|
|
77
92
|
releaseType = fs.existsSync('package.json') ? 'node' : fs.existsSync('pyproject.toml') ? 'python' : fs.existsSync('Cargo.toml') ? 'rust' : fs.existsSync('version.txt') ? 'simple' : 'none'
|
|
78
93
|
}
|
|
79
94
|
if (!['node', 'python', 'rust', 'simple', 'none'].includes(releaseType)) throw new Error(`Unsupported release_type: ${releaseType}`)
|
|
80
|
-
if (
|
|
95
|
+
if (releaseMergeStrategy !== 'squash') {
|
|
96
|
+
throw new Error(`release_merge_strategy must be "squash" for automated release merges; got ${releaseMergeStrategy || '(unset; release automation never defaults to merge)'}`)
|
|
97
|
+
}
|
|
81
98
|
if (releaseType === 'none' || !fs.existsSync('package.json')) npmPublish = 'false'
|
|
82
99
|
let legacyReleaseType = ''
|
|
83
100
|
if (releaseType !== 'none') {
|
|
@@ -98,9 +115,9 @@ jobs:
|
|
|
98
115
|
- name: Detect release credentials
|
|
99
116
|
id: credentials
|
|
100
117
|
env:
|
|
101
|
-
|
|
118
|
+
HAS_AUTOMATION_TOKEN: ${{ secrets.CODE_FOUNDRY_TOKEN != '' || secrets.RELEASE_PLEASE_TOKEN != '' }}
|
|
102
119
|
run: |
|
|
103
|
-
if [
|
|
120
|
+
if [ "$HAS_AUTOMATION_TOKEN" = true ]; then
|
|
104
121
|
echo "auto_merge=true" >> "$GITHUB_OUTPUT"
|
|
105
122
|
else
|
|
106
123
|
echo "auto_merge=false" >> "$GITHUB_OUTPUT"
|
|
@@ -108,19 +125,57 @@ jobs:
|
|
|
108
125
|
- name: Release Please
|
|
109
126
|
id: release
|
|
110
127
|
if: steps.profile.outputs.release_type != 'none'
|
|
111
|
-
uses: googleapis/release-please-action@v5
|
|
128
|
+
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5
|
|
112
129
|
with:
|
|
113
|
-
token: ${{ secrets.RELEASE_PLEASE_TOKEN || github.token }}
|
|
130
|
+
token: ${{ secrets.CODE_FOUNDRY_TOKEN || secrets.RELEASE_PLEASE_TOKEN || github.token }}
|
|
114
131
|
config-file: release-please-config.json
|
|
115
132
|
release-type: ${{ steps.profile.outputs.legacy_release_type }}
|
|
133
|
+
- name: Normalize generated release PR draft state
|
|
134
|
+
if: steps.release.outcome == 'success'
|
|
135
|
+
env:
|
|
136
|
+
HAS_AUTOMATION_TOKEN: ${{ secrets.CODE_FOUNDRY_TOKEN != '' || secrets.RELEASE_PLEASE_TOKEN != '' }}
|
|
137
|
+
GH_TOKEN: ${{ secrets.CODE_FOUNDRY_TOKEN || secrets.RELEASE_PLEASE_TOKEN || github.token }}
|
|
138
|
+
run: |
|
|
139
|
+
set -euo pipefail
|
|
140
|
+
mapfile -t release_prs < <(
|
|
141
|
+
gh pr list \
|
|
142
|
+
--repo "$GITHUB_REPOSITORY" \
|
|
143
|
+
--state open \
|
|
144
|
+
--base main \
|
|
145
|
+
--json number,headRefName \
|
|
146
|
+
--jq '.[] | select(.headRefName | startswith("release-please--branches--main")) | .number'
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
if [ ${#release_prs[@]} -eq 0 ]; then
|
|
150
|
+
exit 0
|
|
151
|
+
fi
|
|
152
|
+
|
|
153
|
+
for pr in "${release_prs[@]}"; do
|
|
154
|
+
PR_DRAFT=$(gh pr view "$pr" --repo "$GITHUB_REPOSITORY" --json isDraft --jq '.isDraft')
|
|
155
|
+
if [ "$HAS_AUTOMATION_TOKEN" = true ]; then
|
|
156
|
+
if [ "$PR_DRAFT" = true ]; then
|
|
157
|
+
gh pr ready "$pr" --repo "$GITHUB_REPOSITORY"
|
|
158
|
+
fi
|
|
159
|
+
else
|
|
160
|
+
if [ "$PR_DRAFT" = false ]; then
|
|
161
|
+
gh pr ready --undo "$pr" --repo "$GITHUB_REPOSITORY"
|
|
162
|
+
fi
|
|
163
|
+
echo "::notice title=Manual release merge required::Release Please created or updated a version pull request. No CODE_FOUNDRY_TOKEN or RELEASE_PLEASE_TOKEN is configured, so release PRs are left in draft and need manual readiness before validation and merge workflows trigger."
|
|
164
|
+
fi
|
|
165
|
+
done
|
|
116
166
|
- name: Leave release pull request for manual merge
|
|
117
167
|
if: steps.release.outputs.prs_created == 'true' && steps.credentials.outputs.auto_merge != 'true'
|
|
168
|
+
env:
|
|
169
|
+
HAS_AUTOMATION_TOKEN: ${{ secrets.CODE_FOUNDRY_TOKEN != '' || secrets.RELEASE_PLEASE_TOKEN != '' }}
|
|
118
170
|
run: |
|
|
119
|
-
|
|
171
|
+
if [ "$HAS_AUTOMATION_TOKEN" != true ]; then
|
|
172
|
+
echo "::notice title=Manual release merge required::Release Please created or updated a version pull request. Configure CODE_FOUNDRY_TOKEN or RELEASE_PLEASE_TOKEN to enable guarded auto-merge when downstream release workflows require it."
|
|
173
|
+
fi
|
|
174
|
+
|
|
120
175
|
- name: Merge generated version pull requests
|
|
121
176
|
if: steps.credentials.outputs.auto_merge == 'true'
|
|
122
177
|
env:
|
|
123
|
-
GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
178
|
+
GH_TOKEN: ${{ secrets.CODE_FOUNDRY_TOKEN || secrets.RELEASE_PLEASE_TOKEN || github.token }}
|
|
124
179
|
run: |
|
|
125
180
|
set -euo pipefail
|
|
126
181
|
mapfile -t release_prs < <(
|
|
@@ -135,11 +190,12 @@ jobs:
|
|
|
135
190
|
echo 'No generated release pull request is open; nothing to merge.'
|
|
136
191
|
exit 0
|
|
137
192
|
fi
|
|
138
|
-
node $RUNNER_TEMP/code-foundry/src/cli.mjs release validate-prs
|
|
193
|
+
node "$RUNNER_TEMP/code-foundry/src/cli.mjs" release validate-prs
|
|
139
194
|
for pr in "${release_prs[@]}"; do
|
|
140
195
|
echo "Waiting for required checks on release PR #$pr"
|
|
141
196
|
checks_seen=false
|
|
142
197
|
for attempt in $(seq 1 60); do
|
|
198
|
+
: "$attempt"
|
|
143
199
|
if required_count=$(gh pr checks "$pr" \
|
|
144
200
|
--repo "$GITHUB_REPOSITORY" \
|
|
145
201
|
--required \
|
|
@@ -162,10 +218,18 @@ jobs:
|
|
|
162
218
|
--watch \
|
|
163
219
|
--fail-fast \
|
|
164
220
|
--interval 10
|
|
221
|
+
release_head=$(gh pr view "$pr" \
|
|
222
|
+
--repo "$GITHUB_REPOSITORY" \
|
|
223
|
+
--json headRefOid \
|
|
224
|
+
--jq '.headRefOid')
|
|
225
|
+
if [ -z "$release_head" ]; then
|
|
226
|
+
echo "Could not resolve head commit SHA for release PR #$pr" >&2
|
|
227
|
+
exit 1
|
|
228
|
+
fi
|
|
165
229
|
gh pr merge "$pr" \
|
|
166
230
|
--repo "$GITHUB_REPOSITORY" \
|
|
167
|
-
--admin \
|
|
168
231
|
--${{ steps.profile.outputs.release_merge_strategy }} \
|
|
232
|
+
--match-head-commit "$release_head" \
|
|
169
233
|
--delete-branch
|
|
170
234
|
done
|
|
171
235
|
|
|
@@ -179,15 +243,21 @@ jobs:
|
|
|
179
243
|
contents: write
|
|
180
244
|
pull-requests: write
|
|
181
245
|
env:
|
|
182
|
-
|
|
246
|
+
# Reconciliation is the sole staging-ruleset bypass. Keep GH_TOKEN scoped to
|
|
247
|
+
# the repository's own GitHub Actions integration token; deploy key use is
|
|
248
|
+
# optional and only activated when STAGING_DEPLOY_KEY is provided.
|
|
249
|
+
GH_TOKEN: ${{ github.token }}
|
|
250
|
+
STAGING_DEPLOY_KEY_PRESENT: ${{ secrets.STAGING_DEPLOY_KEY != '' }}
|
|
183
251
|
steps:
|
|
184
252
|
- name: Checkout repository
|
|
185
|
-
uses: actions/checkout@v7
|
|
253
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
186
254
|
with:
|
|
255
|
+
persist-credentials: false
|
|
187
256
|
fetch-depth: 0
|
|
188
257
|
- name: Checkout runtime
|
|
189
|
-
uses: actions/checkout@v7
|
|
258
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
190
259
|
with:
|
|
260
|
+
persist-credentials: false
|
|
191
261
|
repository: ${{ inputs.runtime-repository }}
|
|
192
262
|
ref: ${{ inputs.runtime-ref }}
|
|
193
263
|
path: .github/.code-foundry
|
|
@@ -205,9 +275,48 @@ jobs:
|
|
|
205
275
|
else
|
|
206
276
|
echo "exists=false" >> "$GITHUB_OUTPUT"
|
|
207
277
|
fi
|
|
278
|
+
- name: Configure staging reconcile transport
|
|
279
|
+
id: staging-reconcile-ssh
|
|
280
|
+
if: steps.staging.outputs.exists == 'true' && env.STAGING_DEPLOY_KEY_PRESENT == 'true'
|
|
281
|
+
env:
|
|
282
|
+
STAGING_DEPLOY_KEY: ${{ secrets.STAGING_DEPLOY_KEY }}
|
|
283
|
+
STAGING_SSH_DIR: ${{ runner.temp }}/staging-reconcile-ssh
|
|
284
|
+
run: |
|
|
285
|
+
set -euo pipefail
|
|
286
|
+
mkdir -p "$STAGING_SSH_DIR"
|
|
287
|
+
chmod 700 "$STAGING_SSH_DIR"
|
|
288
|
+
STAGING_KEY="$STAGING_SSH_DIR/staging_deploy_key"
|
|
289
|
+
STAGING_HOSTS="$STAGING_SSH_DIR/known_hosts"
|
|
290
|
+
printf '%s\n' "$STAGING_DEPLOY_KEY" > "$STAGING_KEY"
|
|
291
|
+
chmod 600 "$STAGING_KEY"
|
|
292
|
+
node <<'NODE' > "$STAGING_HOSTS"
|
|
293
|
+
const { execSync } = require('node:child_process')
|
|
294
|
+
const meta = JSON.parse(execSync('gh api /meta', { encoding: 'utf8' }))
|
|
295
|
+
const keys = Array.isArray(meta?.ssh_keys) ? meta.ssh_keys : []
|
|
296
|
+
const lines = keys
|
|
297
|
+
.filter((value) => typeof value === 'string' && value.trim())
|
|
298
|
+
.map((value) => `github.com ${value.trim()}`)
|
|
299
|
+
.join('\n')
|
|
300
|
+
if (!lines) process.exit(1)
|
|
301
|
+
process.stdout.write(`${lines}\n`)
|
|
302
|
+
NODE
|
|
303
|
+
git remote set-url --push origin "git@github.com:${GITHUB_REPOSITORY}.git"
|
|
304
|
+
echo "ssh_command=ssh -F /dev/null -i $STAGING_KEY -o IdentitiesOnly=yes -o UserKnownHostsFile=$STAGING_HOSTS -o StrictHostKeyChecking=yes" >> "$GITHUB_OUTPUT"
|
|
305
|
+
- name: Configure git for trusted reconcile
|
|
306
|
+
if: steps.staging.outputs.exists == 'true' && env.STAGING_DEPLOY_KEY_PRESENT != 'true'
|
|
307
|
+
run: gh auth setup-git
|
|
208
308
|
- name: Reconcile release metadata
|
|
209
309
|
if: steps.staging.outputs.exists == 'true'
|
|
210
|
-
|
|
310
|
+
env:
|
|
311
|
+
GIT_SSH_COMMAND: ${{ steps.staging-reconcile-ssh.outputs.ssh_command || '' }}
|
|
312
|
+
run: node "$RUNNER_TEMP/code-foundry/src/cli.mjs" release reconcile --github --base main --head staging
|
|
313
|
+
- name: Clear reconcile SSH material
|
|
314
|
+
if: always() && steps.staging.outputs.exists == 'true'
|
|
315
|
+
env:
|
|
316
|
+
STAGING_SSH_DIR: ${{ runner.temp }}/staging-reconcile-ssh
|
|
317
|
+
run: |
|
|
318
|
+
rm -f -- "$STAGING_SSH_DIR/staging_deploy_key" "$STAGING_SSH_DIR/known_hosts"
|
|
319
|
+
rmdir "$STAGING_SSH_DIR" 2>/dev/null || true
|
|
211
320
|
- name: Skip without staging
|
|
212
321
|
if: steps.staging.outputs.exists != 'true'
|
|
213
322
|
run: echo 'No staging branch exists; release reconciliation is not applicable.'
|
|
@@ -225,16 +334,19 @@ jobs:
|
|
|
225
334
|
actions: write
|
|
226
335
|
contents: read
|
|
227
336
|
env:
|
|
228
|
-
RELEASE_PLEASE_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
337
|
+
RELEASE_PLEASE_TOKEN: ${{ secrets.CODE_FOUNDRY_TOKEN || secrets.RELEASE_PLEASE_TOKEN }}
|
|
338
|
+
GH_TOKEN: ${{ secrets.CODE_FOUNDRY_TOKEN || secrets.RELEASE_PLEASE_TOKEN || github.token }}
|
|
229
339
|
steps:
|
|
230
340
|
- name: Checkout repository
|
|
231
|
-
uses: actions/checkout@v7
|
|
341
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
232
342
|
with:
|
|
343
|
+
persist-credentials: false
|
|
233
344
|
ref: ${{ needs.release.outputs.tag_name }}
|
|
234
345
|
filter: blob:none
|
|
235
346
|
- name: Checkout runtime
|
|
236
|
-
uses: actions/checkout@v7
|
|
347
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
237
348
|
with:
|
|
349
|
+
persist-credentials: false
|
|
238
350
|
repository: ${{ inputs.runtime-repository }}
|
|
239
351
|
ref: ${{ inputs.runtime-ref }}
|
|
240
352
|
path: .github/.code-foundry
|
|
@@ -260,7 +372,7 @@ jobs:
|
|
|
260
372
|
NODE
|
|
261
373
|
- name: Dispatch post-release hook once
|
|
262
374
|
if: steps.hook.outputs.enabled == 'true' && steps.hook.outputs.workflow != ''
|
|
263
|
-
run: node $RUNNER_TEMP/code-foundry/src/cli.mjs release hook --tag '${{ needs.release.outputs.tag_name }}' --workflow '${{ steps.hook.outputs.workflow }}' --mode '${{ steps.hook.outputs.mode }}'
|
|
375
|
+
run: node "$RUNNER_TEMP/code-foundry/src/cli.mjs" release hook --tag '${{ needs.release.outputs.tag_name }}' --workflow '${{ steps.hook.outputs.workflow }}' --mode '${{ steps.hook.outputs.mode }}'
|
|
264
376
|
- name: Explain disabled post-release hook
|
|
265
377
|
if: steps.hook.outputs.enabled != 'true' || steps.hook.outputs.workflow == ''
|
|
266
378
|
run: echo 'No post-release workflow configured; artifact delivery is intentionally skipped.'
|
|
@@ -278,17 +390,18 @@ jobs:
|
|
|
278
390
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
279
391
|
steps:
|
|
280
392
|
- name: Checkout release
|
|
281
|
-
uses: actions/checkout@v7
|
|
393
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
282
394
|
with:
|
|
395
|
+
persist-credentials: false
|
|
283
396
|
ref: ${{ needs.release.outputs.tag_name }}
|
|
284
397
|
- name: Setup Node (trusted)
|
|
285
398
|
if: env.NPM_TOKEN == ''
|
|
286
|
-
uses: actions/setup-node@v5
|
|
399
|
+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
|
|
287
400
|
with:
|
|
288
401
|
node-version: 24
|
|
289
402
|
- name: Setup Node (token)
|
|
290
403
|
if: env.NPM_TOKEN != ''
|
|
291
|
-
uses: actions/setup-node@v5
|
|
404
|
+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
|
|
292
405
|
with:
|
|
293
406
|
node-version: 24
|
|
294
407
|
registry-url: https://registry.npmjs.org
|
|
@@ -20,4 +20,8 @@ jobs:
|
|
|
20
20
|
runner: ubuntu-slim
|
|
21
21
|
runtime-repository: 0xPlayerOne/code-foundry
|
|
22
22
|
runtime-ref: ${{ github.sha }}
|
|
23
|
-
secrets:
|
|
23
|
+
secrets:
|
|
24
|
+
CODE_FOUNDRY_TOKEN: ${{ secrets.CODE_FOUNDRY_TOKEN }}
|
|
25
|
+
RELEASE_PLEASE_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
26
|
+
STAGING_DEPLOY_KEY: ${{ secrets.STAGING_DEPLOY_KEY }}
|
|
27
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -18,7 +18,6 @@ on:
|
|
|
18
18
|
required: false
|
|
19
19
|
type: string
|
|
20
20
|
default: ubuntu-slim
|
|
21
|
-
|
|
22
21
|
permissions:
|
|
23
22
|
contents: read
|
|
24
23
|
|
|
@@ -47,8 +46,9 @@ jobs:
|
|
|
47
46
|
dependency_review: ${{ steps.profile.outputs.dependency_review }}
|
|
48
47
|
steps:
|
|
49
48
|
- name: Checkout
|
|
50
|
-
uses: actions/checkout@v7
|
|
49
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
51
50
|
with:
|
|
51
|
+
persist-credentials: false
|
|
52
52
|
fetch-depth: 2
|
|
53
53
|
filter: blob:none
|
|
54
54
|
sparse-checkout: |
|
|
@@ -77,8 +77,9 @@ jobs:
|
|
|
77
77
|
**/uv.lock
|
|
78
78
|
sparse-checkout-cone-mode: false
|
|
79
79
|
- name: Runtime
|
|
80
|
-
uses: actions/checkout@v7
|
|
80
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
81
81
|
with:
|
|
82
|
+
persist-credentials: false
|
|
82
83
|
repository: ${{ inputs.runtime-repository }}
|
|
83
84
|
ref: ${{ inputs.runtime-ref }}
|
|
84
85
|
path: .github/.code-foundry
|
|
@@ -106,8 +107,9 @@ jobs:
|
|
|
106
107
|
timeout-minutes: 20
|
|
107
108
|
steps:
|
|
108
109
|
- name: Checkout
|
|
109
|
-
uses: actions/checkout@v7
|
|
110
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
110
111
|
with:
|
|
112
|
+
persist-credentials: false
|
|
111
113
|
filter: blob:none
|
|
112
114
|
sparse-checkout: |
|
|
113
115
|
.github
|
|
@@ -124,8 +126,9 @@ jobs:
|
|
|
124
126
|
**/package-lock.json
|
|
125
127
|
sparse-checkout-cone-mode: false
|
|
126
128
|
- name: Runtime
|
|
127
|
-
uses: actions/checkout@v7
|
|
129
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
128
130
|
with:
|
|
131
|
+
persist-credentials: false
|
|
129
132
|
repository: ${{ inputs.runtime-repository }}
|
|
130
133
|
ref: ${{ inputs.runtime-ref }}
|
|
131
134
|
path: .github/.code-foundry
|
|
@@ -159,8 +162,9 @@ jobs:
|
|
|
159
162
|
timeout-minutes: 20
|
|
160
163
|
steps:
|
|
161
164
|
- name: Checkout
|
|
162
|
-
uses: actions/checkout@v7
|
|
165
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
163
166
|
with:
|
|
167
|
+
persist-credentials: false
|
|
164
168
|
filter: blob:none
|
|
165
169
|
sparse-checkout: |
|
|
166
170
|
.github
|
|
@@ -171,8 +175,9 @@ jobs:
|
|
|
171
175
|
**/.cargo/**
|
|
172
176
|
sparse-checkout-cone-mode: false
|
|
173
177
|
- name: Runtime
|
|
174
|
-
uses: actions/checkout@v7
|
|
178
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
175
179
|
with:
|
|
180
|
+
persist-credentials: false
|
|
176
181
|
repository: ${{ inputs.runtime-repository }}
|
|
177
182
|
ref: ${{ inputs.runtime-ref }}
|
|
178
183
|
path: .github/.code-foundry
|
|
@@ -210,7 +215,7 @@ jobs:
|
|
|
210
215
|
cache-save: ${{ github.event_name != 'pull_request' }}
|
|
211
216
|
- name: Install cargo-audit
|
|
212
217
|
if: steps.applicability.outputs.applicable == 'true'
|
|
213
|
-
uses: taiki-e/install-action@v2
|
|
218
|
+
uses: taiki-e/install-action@6a1bd70eaac3c8bdf093356838d7ee09fda951cf # v2
|
|
214
219
|
with:
|
|
215
220
|
tool: cargo-audit
|
|
216
221
|
- name: Audit dependencies
|
|
@@ -235,8 +240,9 @@ jobs:
|
|
|
235
240
|
REPO_FOUNDRY_PYTHON_REQUIREMENT: ${{ matrix.requirement }}
|
|
236
241
|
steps:
|
|
237
242
|
- name: Checkout
|
|
238
|
-
uses: actions/checkout@v7
|
|
243
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
239
244
|
with:
|
|
245
|
+
persist-credentials: false
|
|
240
246
|
filter: blob:none
|
|
241
247
|
sparse-checkout: |
|
|
242
248
|
.github
|
|
@@ -252,8 +258,9 @@ jobs:
|
|
|
252
258
|
**/uv.lock
|
|
253
259
|
sparse-checkout-cone-mode: false
|
|
254
260
|
- name: Runtime
|
|
255
|
-
uses: actions/checkout@v7
|
|
261
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
256
262
|
with:
|
|
263
|
+
persist-credentials: false
|
|
257
264
|
repository: ${{ inputs.runtime-repository }}
|
|
258
265
|
ref: ${{ inputs.runtime-ref }}
|
|
259
266
|
path: .github/.code-foundry
|
|
@@ -307,7 +314,7 @@ jobs:
|
|
|
307
314
|
timeout-minutes: 10
|
|
308
315
|
steps:
|
|
309
316
|
- name: Review
|
|
310
|
-
uses: actions/dependency-review-action@v5
|
|
317
|
+
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5
|
|
311
318
|
with:
|
|
312
319
|
fail-on-severity: high
|
|
313
320
|
license-check: true
|
|
@@ -23,6 +23,14 @@ on:
|
|
|
23
23
|
required: false
|
|
24
24
|
type: string
|
|
25
25
|
default: ubuntu-slim
|
|
26
|
+
unit-only:
|
|
27
|
+
description: Run only the unit-test subset; skip integration, E2E, and smoke jobs.
|
|
28
|
+
required: false
|
|
29
|
+
type: boolean
|
|
30
|
+
default: false
|
|
31
|
+
secrets:
|
|
32
|
+
TURBO_TOKEN:
|
|
33
|
+
required: false
|
|
26
34
|
|
|
27
35
|
permissions:
|
|
28
36
|
contents: read
|
|
@@ -50,12 +58,14 @@ jobs:
|
|
|
50
58
|
timeout-minutes: 30
|
|
51
59
|
steps:
|
|
52
60
|
- name: Checkout
|
|
53
|
-
uses: actions/checkout@v7
|
|
61
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
54
62
|
with:
|
|
63
|
+
persist-credentials: false
|
|
55
64
|
fetch-depth: 2
|
|
56
65
|
- name: Runtime
|
|
57
|
-
uses: actions/checkout@v7
|
|
66
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
58
67
|
with:
|
|
68
|
+
persist-credentials: false
|
|
59
69
|
repository: ${{ inputs.runtime-repository }}
|
|
60
70
|
ref: ${{ inputs.runtime-ref }}
|
|
61
71
|
path: .github/.code-foundry
|
|
@@ -94,7 +104,7 @@ jobs:
|
|
|
94
104
|
always() &&
|
|
95
105
|
steps.applicability.outputs.applicable == 'true' &&
|
|
96
106
|
hashFiles('coverage/**', 'htmlcov/**', '.coverage*', 'target/llvm-cov/**') != ''
|
|
97
|
-
uses: actions/upload-artifact@v7
|
|
107
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
98
108
|
with:
|
|
99
109
|
name: coverage-unit-${{ github.run_id }}
|
|
100
110
|
path: |
|
|
@@ -108,16 +118,19 @@ jobs:
|
|
|
108
118
|
|
|
109
119
|
integration:
|
|
110
120
|
name: Integration
|
|
121
|
+
if: inputs.unit-only != true
|
|
111
122
|
runs-on: ${{ inputs.runner }}
|
|
112
123
|
timeout-minutes: 30
|
|
113
124
|
steps:
|
|
114
125
|
- name: Checkout
|
|
115
|
-
uses: actions/checkout@v7
|
|
126
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
116
127
|
with:
|
|
128
|
+
persist-credentials: false
|
|
117
129
|
fetch-depth: 2
|
|
118
130
|
- name: Runtime
|
|
119
|
-
uses: actions/checkout@v7
|
|
131
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
120
132
|
with:
|
|
133
|
+
persist-credentials: false
|
|
121
134
|
repository: ${{ inputs.runtime-repository }}
|
|
122
135
|
ref: ${{ inputs.runtime-ref }}
|
|
123
136
|
path: .github/.code-foundry
|
|
@@ -154,16 +167,19 @@ jobs:
|
|
|
154
167
|
|
|
155
168
|
e2e:
|
|
156
169
|
name: E2E
|
|
170
|
+
if: inputs.unit-only != true
|
|
157
171
|
runs-on: ${{ inputs.runner }}
|
|
158
172
|
timeout-minutes: 45
|
|
159
173
|
steps:
|
|
160
174
|
- name: Checkout
|
|
161
|
-
uses: actions/checkout@v7
|
|
175
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
162
176
|
with:
|
|
177
|
+
persist-credentials: false
|
|
163
178
|
fetch-depth: 2
|
|
164
179
|
- name: Runtime
|
|
165
|
-
uses: actions/checkout@v7
|
|
180
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
166
181
|
with:
|
|
182
|
+
persist-credentials: false
|
|
167
183
|
repository: ${{ inputs.runtime-repository }}
|
|
168
184
|
ref: ${{ inputs.runtime-ref }}
|
|
169
185
|
path: .github/.code-foundry
|
|
@@ -212,16 +228,19 @@ jobs:
|
|
|
212
228
|
|
|
213
229
|
smoke:
|
|
214
230
|
name: Smoke
|
|
231
|
+
if: inputs.unit-only != true
|
|
215
232
|
runs-on: ${{ inputs.runner }}
|
|
216
233
|
timeout-minutes: 15
|
|
217
234
|
steps:
|
|
218
235
|
- name: Checkout
|
|
219
|
-
uses: actions/checkout@v7
|
|
236
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
220
237
|
with:
|
|
238
|
+
persist-credentials: false
|
|
221
239
|
fetch-depth: 2
|
|
222
240
|
- name: Runtime
|
|
223
|
-
uses: actions/checkout@v7
|
|
241
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
224
242
|
with:
|
|
243
|
+
persist-credentials: false
|
|
225
244
|
repository: ${{ inputs.runtime-repository }}
|
|
226
245
|
ref: ${{ inputs.runtime-ref }}
|
|
227
246
|
path: .github/.code-foundry
|