fix(cic): narrow workflow.on before Object.keys in python-release assertion

Guard workflow.on with isRecord before Object.keys to satisfy TS2769.
This commit is contained in:
Chinesezjc
2026-08-21 11:54:36 +08:00
parent 374f3cdb07
commit ae193bfc07
+1
View File
@@ -288,6 +288,7 @@ describe('Python release workflows', () => {
}
expect(dispatch.inputs.publish).toMatchObject({ type: 'boolean', default: false })
if (!isRecord(workflow.on)) throw new TypeError('python-release workflow must define on')
expect(Object.keys(workflow.on)).toEqual(['workflow_dispatch'])
expect(build).toMatchObject({
if: "github.event_name == 'workflow_dispatch'",