(sources)
| 372 | // way the runner would have rendered them for a given event, and the precedence |
| 373 | // between them — the part that is actually under test — runs as written. |
| 374 | function runPrRefs(sources) { |
| 375 | const fixture = makeFixture(); |
| 376 | try { |
| 377 | const env = Object.assign( |
| 378 | { |
| 379 | INPUT_BASE_REF: "", |
| 380 | INPUT_HEAD_SHA: "", |
| 381 | INPUT_PR_NUMBER: "", |
| 382 | EVENT_BASE_REF: "main", |
| 383 | EVENT_HEAD_SHA: "a".repeat(40), |
| 384 | EVENT_PR_NUMBER: "", |
| 385 | WORKFLOW_RUN_PR_NUMBER: "", |
| 386 | GITHUB_EVENT_NAME: "workflow_run", |
| 387 | }, |
| 388 | sources |
| 389 | ); |
| 390 | const result = runShell(renderedRun(prRefsStep(), inputValues()), env, fixture); |
| 391 | return { result, exported: readEnvAssignments(path.join(fixture.dir, "github-env")) }; |
| 392 | } finally { |
| 393 | removeFixture(fixture); |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | function testPrNumberInputIsOptionalAndDocumented() { |
| 398 | assert.ok(INPUTS.pr_number, "action.yml must define the pr_number input"); |
no test coverage detected