Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/changeset-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
changed_files="$(git diff --name-only "origin/${BASE_REF}...HEAD")"
package_changes="$(
printf '%s\n' "$changed_files" |
grep -Ev '^(\.changeset/pre\.json|CHANGELOG\.md|package(-lock)?\.json|packages/[^/]+/(CHANGELOG\.md|package\.json)|src/lib/version\.ts|docs/(llms\.txt|TYPE-SUMMARY\.md)|\.github/workflows/(changeset-check|ci|release)\.yml)$' ||
grep -Ev '^(\.changeset/pre\.json|CHANGELOG\.md|package(-lock)?\.json|packages/[^/]+/(CHANGELOG\.md|package\.json)|src/lib/version\.ts|docs/(llms\.txt|TYPE-SUMMARY\.md)|\.github/workflows/(changeset-check|ci|codeql|interop-python|release)\.yml)$' ||
true
)"

Expand Down
69 changes: 67 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI/CD Pipeline

on:
push:
branches: [main]
branches: [main, 13.x]
pull_request:
branches: [main]
branches: [main, 13.x]

permissions:
contents: read
Expand Down Expand Up @@ -41,6 +41,71 @@ jobs:
- name: Lint GitHub Actions workflows
run: npm run lint:workflows

# These exact event/path expectations are deliberately 13.x-local. Adapt
# them when forward-merging or adding workflow_dispatch/path filters.
- name: Verify stable maintenance workflow coverage
run: |
node - <<'NODE'
const assert = require('node:assert/strict');
const fs = require('node:fs');
const { parse } = require('yaml');

const readWorkflow = name =>
parse(fs.readFileSync(`.github/workflows/${name}.yml`, 'utf8'));
const expectedBranches = ['13.x', 'main'];
const assertEvents = (workflow, expected, name) => {
assert.deepEqual(
Object.keys(workflow.on ?? {}).sort(),
[...expected].sort(),
`${name} must expose only its intended events`
);
};
const assertBranches = (workflow, event, name) => {
const trigger = workflow.on?.[event];
assert.deepEqual(
Object.keys(trigger ?? {}).sort(),
['branches'],
`${name} ${event} must not add path or ignore filters`
);
assert.deepEqual(
[...(trigger?.branches ?? [])].sort(),
expectedBranches,
`${name} ${event} branches must be exactly main and 13.x`
);
};

const ci = readWorkflow('ci');
assertEvents(ci, ['push', 'pull_request'], 'ci.yml');
assertBranches(ci, 'push', 'ci.yml');
assertBranches(ci, 'pull_request', 'ci.yml');

const changesetCheck = readWorkflow('changeset-check');
assertEvents(changesetCheck, ['pull_request'], 'changeset-check.yml');
assertBranches(changesetCheck, 'pull_request', 'changeset-check.yml');

const codeql = readWorkflow('codeql');
assertEvents(codeql, ['push', 'pull_request', 'schedule'], 'codeql.yml');
assertBranches(codeql, 'push', 'codeql.yml');
assertBranches(codeql, 'pull_request', 'codeql.yml');

const interop = readWorkflow('interop-python');
assertEvents(
interop,
['pull_request', 'workflow_dispatch', 'workflow_call'],
'interop-python.yml'
);
assertBranches(interop, 'pull_request', 'interop-python.yml');
assert.equal(
interop.on?.push,
undefined,
'interop-python.yml must rely on release.yml for push events'
);

const release = readWorkflow('release');
assertEvents(release, ['push'], 'release.yml');
assertBranches(release, 'push', 'release.yml');
NODE

- name: Sync schemas from AdCP
run: npm run sync-schemas:all

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
branches: [ "main", "13.x" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "13.x" ]
schedule:
- cron: '37 3 * * 2'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/interop-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Reference Seller Interop

on:
pull_request:
branches: [main]
branches: [main, 13.x]
workflow_dispatch:
inputs:
python_ref:
Expand Down
Loading