Skip to content

Commit ee097c2

Browse files
committed
chore: harden workflow configuration
Release-As: 2.0.1
1 parent b1ac46f commit ee097c2

7 files changed

Lines changed: 26 additions & 16 deletions

File tree

.github/workflows/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Workflow Maintenance
22

3-
`self-test.yml` and `realistic-test.yml` are generated by
3+
`self-test.yml.disabled` and `realistic-test.yml.disabled` are generated by
44
`scripts/generate-self-test.ts`.
55

66
Do not edit those generated workflow files directly, including GitHub Action
@@ -9,3 +9,12 @@ version or SHA pin changes. Update the generator, then run:
99
```sh
1010
npm run generate:self-test
1111
```
12+
13+
Both self-test workflows are intentionally disabled for now. They preserve live
14+
GitHub API usage scenarios that exercise this action through an external
15+
repository ref, but they have not been part of regular maintenance and can add
16+
Scorecard noise because of that external ref.
17+
18+
If a future Scorecard scan still treats `*.yml.disabled` files under
19+
`.github/workflows` as active build inputs, move these generated files out of
20+
`.github/workflows`.

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ concurrency:
1212

1313
permissions:
1414
contents: read
15-
actions: write
1615

1716
jobs:
1817
build:
@@ -44,7 +43,7 @@ jobs:
4443
run: npm run generate:self-test
4544

4645
- name: Verify self-test workflows are up to date
47-
run: git diff --exit-code -- .github/workflows/self-test.yml .github/workflows/realistic-test.yml scripts/self-test-manifest.json
46+
run: git diff --exit-code -- .github/workflows/self-test.yml.disabled .github/workflows/realistic-test.yml.disabled scripts/self-test-manifest.json
4847

4948
- name: Typecheck
5049
run: npm run typecheck
@@ -79,7 +78,7 @@ jobs:
7978
run: npm run generate:self-test
8079

8180
- name: Verify self-test workflows are up to date
82-
run: git diff --exit-code -- .github/workflows/self-test.yml .github/workflows/realistic-test.yml scripts/self-test-manifest.json
81+
run: git diff --exit-code -- .github/workflows/self-test.yml.disabled .github/workflows/realistic-test.yml.disabled scripts/self-test-manifest.json
8382

8483
- name: Typecheck
8584
run: npm run typecheck
File renamed without changes.

.github/workflows/release-please.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ on:
66
workflow_dispatch:
77

88
permissions:
9-
contents: write
10-
pull-requests: write
9+
contents: read
1110

1211
jobs:
1312
release-please:
1413
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
1517
steps:
1618
- name: Checkout
1719
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

docs/MAINTAINERS.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ regressions and to verify the poller and post hook behave as expected.
5353

5454
### What they are
5555

56-
- Workflow files: `.github/workflows/self-test.yml` and `.github/workflows/realistic-test.yml`
56+
- Workflow files: `.github/workflows/self-test.yml.disabled` and `.github/workflows/realistic-test.yml.disabled`
5757
- Generator: `scripts/generate-self-test.ts`
5858
- Scenarios manifest: `scripts/scenarios.ts` (inputs) and `scripts/self-test-manifest.json` (generated)
5959
- Scenario runner: `scripts/run-scenario.mjs`
@@ -64,19 +64,19 @@ regressions and to verify the poller and post hook behave as expected.
6464

6565
- **Source of truth**: `scripts/scenarios.ts` defines all scenarios.
6666
- Run `npm run generate:self-test` to regenerate:
67-
- `.github/workflows/self-test.yml`
68-
- `.github/workflows/realistic-test.yml` (only if realistic scenarios exist)
67+
- `.github/workflows/self-test.yml.disabled`
68+
- `.github/workflows/realistic-test.yml.disabled` (only if realistic scenarios exist)
6969
- `scripts/self-test-manifest.json`
7070
- Do not hand-edit the generated workflow files. The header in each workflow
7171
indicates they are auto-generated.
7272

7373
### When and why to run
7474

75-
- Use **Self-Test** (`self-test.yml`) for quick regression checks after changes
76-
to reducer logic, polling behavior, state handling, or output formatting.
77-
- Use **Realistic Test** (`realistic-test.yml`) for longer-duration behavior or
78-
more production-like traffic patterns. This is intentionally separate to avoid
79-
slowing normal self-tests.
75+
- `self-test.yml.disabled` preserves the shorter controlled regression scenarios
76+
for reducer logic, polling behavior, state handling, and output formatting.
77+
- `realistic-test.yml.disabled` preserves the longer-duration, production-like
78+
traffic pattern as an inactive workflow. Re-enable it only for deliberate
79+
soak-test work or after adding assertions that make it useful as a CI signal.
8080
- Both workflows require `diagnostics: true` so they can download and analyze
8181
the diagnostics artifact. This is handled in the generator.
8282

scripts/generate-self-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import { SCENARIOS } from "./scenarios.js";
1414
import type { Scenario } from "./scenarios.js";
1515

1616
const __dirname = dirname(fileURLToPath(import.meta.url));
17-
const workflowPath = join(__dirname, "..", ".github", "workflows", "self-test.yml");
17+
const workflowPath = join(__dirname, "..", ".github", "workflows", "self-test.yml.disabled");
1818
const realisticWorkflowPath = join(
1919
__dirname,
2020
"..",
2121
".github",
2222
"workflows",
23-
"realistic-test.yml"
23+
"realistic-test.yml.disabled"
2424
);
2525
const manifestPath = join(__dirname, "self-test-manifest.json");
2626
const ARTIFACT_PREFIX = "github-api-usage-monitor";

0 commit comments

Comments
 (0)