Skip to content

Commit d68d22f

Browse files
authored
Merge pull request #105 from script-development/armorer/oidc-gate-mutation-reporter
ci: gate OIDC publish mint surface + durable mutation-score reporter
2 parents f6ced8f + 5505cad commit d68d22f

13 files changed

Lines changed: 56 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,16 @@ jobs:
2323
- run: npm run lint:pkg
2424
- run: npm run test:coverage
2525
- run: npm run test:mutation
26+
# Durable mutation-score artifact: each package's Stryker run writes
27+
# JSON + HTML to packages/<pkg>/reports/mutation/. Retain them as a
28+
# downloadable run artifact so the per-package score is retrievable
29+
# after the run, not just ephemeral stdout. if: always() captures the
30+
# report even when the break:90 gate fails (the score is the evidence).
31+
- name: Upload mutation reports
32+
if: always()
33+
uses: actions/upload-artifact@v7
34+
with:
35+
name: mutation-reports
36+
path: packages/*/reports/mutation/
37+
retention-days: 30
38+
if-no-files-found: warn

.github/workflows/publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ name: Publish
33
on:
44
push:
55
branches: [main]
6+
# Narrowed from '**/package.json' to package manifests only: a real
7+
# release signal is a version edit under packages/<pkg>/package.json.
8+
# Root/devDep manifest churn (dependabot, tooling) must NOT start the
9+
# OIDC-minting publish job. (Sapper M2 H1 / STALE-4.)
610
paths:
7-
- '**/package.json'
11+
- 'packages/*/package.json'
812

913
jobs:
1014
build:
@@ -28,6 +32,11 @@ jobs:
2832
publish:
2933
needs: build
3034
runs-on: ubuntu-latest
35+
# Environment gate: the OIDC mint (id-token: write) is fronted by the
36+
# 'npm-publish' deployment environment, whose protection rule (required
37+
# reviewer / wait timer) gates the token mint behind a human/policy
38+
# checkpoint. (Sapper M2 H1 / STALE-4.)
39+
environment: npm-publish
3140
permissions:
3241
contents: write
3342
id-token: write

packages/adapter-store/stryker.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ export default {
44
vitest: {configFile: 'vitest.config.ts'},
55
mutate: ['src/**/*.ts', '!src/**/types.ts'],
66
thresholds: {high: 95, low: 90, break: 90},
7-
reporters: ['clear-text', 'progress'],
7+
reporters: ['clear-text', 'progress', 'json', 'html'],
8+
jsonReporter: {fileName: 'reports/mutation/mutation.json'},
9+
htmlReporter: {fileName: 'reports/mutation/mutation.html'},
810
incremental: true,
911
incrementalFile: '.stryker-incremental.json',
1012
cleanTempDir: 'always',

packages/cached-adapter-store/stryker.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ export default {
44
vitest: {configFile: 'vitest.config.ts'},
55
mutate: ['src/**/*.ts', '!src/**/types.ts'],
66
thresholds: {high: 95, low: 90, break: 90},
7-
reporters: ['clear-text', 'progress'],
7+
reporters: ['clear-text', 'progress', 'json', 'html'],
8+
jsonReporter: {fileName: 'reports/mutation/mutation.json'},
9+
htmlReporter: {fileName: 'reports/mutation/mutation.html'},
810
incremental: true,
911
incrementalFile: '.stryker-incremental.json',
1012
cleanTempDir: 'always',

packages/dialog/stryker.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ export default {
44
vitest: {configFile: 'vitest.config.ts'},
55
mutate: ['src/**/*.ts', '!src/**/types.ts'],
66
thresholds: {high: 95, low: 90, break: 90},
7-
reporters: ['clear-text', 'progress'],
7+
reporters: ['clear-text', 'progress', 'json', 'html'],
8+
jsonReporter: {fileName: 'reports/mutation/mutation.json'},
9+
htmlReporter: {fileName: 'reports/mutation/mutation.html'},
810
incremental: true,
911
incrementalFile: '.stryker-incremental.json',
1012
cleanTempDir: 'always',

packages/helpers/stryker.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ export default {
44
vitest: {configFile: 'vitest.config.ts'},
55
mutate: ['src/**/*.ts', '!src/**/types.ts'],
66
thresholds: {high: 95, low: 90, break: 90},
7-
reporters: ['clear-text', 'progress'],
7+
reporters: ['clear-text', 'progress', 'json', 'html'],
8+
jsonReporter: {fileName: 'reports/mutation/mutation.json'},
9+
htmlReporter: {fileName: 'reports/mutation/mutation.html'},
810
incremental: true,
911
incrementalFile: '.stryker-incremental.json',
1012
cleanTempDir: 'always',

packages/http/stryker.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ export default {
44
vitest: {configFile: 'vitest.config.ts'},
55
mutate: ['src/**/*.ts', '!src/**/types.ts'],
66
thresholds: {high: 95, low: 90, break: 90},
7-
reporters: ['clear-text', 'progress'],
7+
reporters: ['clear-text', 'progress', 'json', 'html'],
8+
jsonReporter: {fileName: 'reports/mutation/mutation.json'},
9+
htmlReporter: {fileName: 'reports/mutation/mutation.html'},
810
incremental: true,
911
incrementalFile: '.stryker-incremental.json',
1012
cleanTempDir: 'always',

packages/loading/stryker.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ export default {
44
vitest: {configFile: 'vitest.config.ts'},
55
mutate: ['src/**/*.ts', '!src/**/types.ts'],
66
thresholds: {high: 95, low: 90, break: 90},
7-
reporters: ['clear-text', 'progress'],
7+
reporters: ['clear-text', 'progress', 'json', 'html'],
8+
jsonReporter: {fileName: 'reports/mutation/mutation.json'},
9+
htmlReporter: {fileName: 'reports/mutation/mutation.html'},
810
incremental: true,
911
incrementalFile: '.stryker-incremental.json',
1012
cleanTempDir: 'always',

packages/router/stryker.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ export default {
44
vitest: {configFile: 'vitest.config.ts'},
55
mutate: ['src/**/*.ts', '!src/**/types.ts'],
66
thresholds: {high: 95, low: 90, break: 90},
7-
reporters: ['clear-text', 'progress'],
7+
reporters: ['clear-text', 'progress', 'json', 'html'],
8+
jsonReporter: {fileName: 'reports/mutation/mutation.json'},
9+
htmlReporter: {fileName: 'reports/mutation/mutation.html'},
810
incremental: true,
911
incrementalFile: '.stryker-incremental.json',
1012
cleanTempDir: 'always',

packages/storage/stryker.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ export default {
44
vitest: {configFile: 'vitest.config.ts'},
55
mutate: ['src/**/*.ts', '!src/**/types.ts'],
66
thresholds: {high: 95, low: 90, break: 90},
7-
reporters: ['clear-text', 'progress'],
7+
reporters: ['clear-text', 'progress', 'json', 'html'],
8+
jsonReporter: {fileName: 'reports/mutation/mutation.json'},
9+
htmlReporter: {fileName: 'reports/mutation/mutation.html'},
810
incremental: true,
911
incrementalFile: '.stryker-incremental.json',
1012
cleanTempDir: 'always',

0 commit comments

Comments
 (0)