(sources)
| 385 | // way the runner would have rendered them for a given event, and the precedence |
| 386 | // between them — the part that is actually under test — runs as written. |
| 387 | function runPrRefs(sources) { |
| 388 | const fixture = makeFixture(); |
| 389 | try { |
| 390 | const env = Object.assign( |
| 391 | { |
| 392 | INPUT_BASE_REF: "", |
| 393 | INPUT_HEAD_SHA: "", |
| 394 | INPUT_PR_NUMBER: "", |
| 395 | EVENT_BASE_REF: "main", |
| 396 | EVENT_HEAD_SHA: "a".repeat(40), |
| 397 | EVENT_PR_NUMBER: "", |
| 398 | WORKFLOW_RUN_PR_NUMBER: "", |
| 399 | GITHUB_EVENT_NAME: "workflow_run", |
| 400 | }, |
| 401 | sources |
| 402 | ); |
| 403 | const result = runShell(renderedRun(prRefsStep(), inputValues()), env, fixture); |
| 404 | return { result, exported: readEnvAssignments(path.join(fixture.dir, "github-env")) }; |
| 405 | } finally { |
| 406 | removeFixture(fixture); |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | function testPrNumberInputIsOptionalAndDocumented() { |
| 411 | assert.ok(INPUTS.pr_number, "action.yml must define the pr_number input"); |
no test coverage detected