Troubleshooting the Integration Test Failure
When dev-integration-testing runs without the exposed URL, you might see:APP_INGRESS_URL isn’t available to the test job. To fix this, we need to define and export outputs in our reusable workflow.
1. Define Workflow-Level Outputs
Edit.github/workflows/reuse-deployment.yml and add an outputs section under on.workflow_call:
2. Map Job Outputs to Workflow Outputs
Inside thereuse-deploy job, expose the ingress host address:
Make sure the
id in the step (here: set-ingress-host) matches when you reference steps.<id>.outputs.3. Consume Outputs in the Caller Workflow
In your main workflow (e.g.,.github/workflows/ci.yml), invoke the reusable workflow and pass its outputs to integration tests:
4. Verify the Workflow Summary
After committing and pushing, the GitHub Actions summary will show all jobs passing, including the integration tests with the correct URLs.
- Defining inputs, secrets, and outputs in a reusable workflow.
- Mapping job-level outputs to workflow-level outputs.
- Accessing those outputs in downstream jobs.