GitHub Actions
Prepare GitHub Actions secrets, variables, triggers, and branch protection for a ContextQA test-plan quality gate.
Documentation owner: Deep Barot · Last updated: November 11, 2026
Quick answer
Prepare GitHub Actions secrets, variables, triggers, and branch protection for a ContextQA test-plan quality gate. Use this page to understand when the capability applies, complete its user-facing workflow, and verify the expected result.
Key takeaways
Prepare GitHub Actions secrets, variables, triggers, and branch protection for a ContextQA test-plan quality gate.
Create and manually validate the test plan you want to use as the gate.
In the GitHub repository, open Settings → Secrets and variables → Actions.
What this page covers
Use GitHub Actions to place a ContextQA test-plan result in the pull-request or deployment path. ContextQA runs the browsers or devices; the GitHub runner coordinates the request and evaluates the result.
Before you begin
Create and manually validate the test plan you want to use as the gate.
Open the plan's CI / CD tab and confirm GitHub Actions is listed.
Select the intended environment and mobile build source, when applicable.
Create a dedicated API token with the narrowest required scopes.
Store GitHub configuration
In the GitHub repository, open Settings → Secrets and variables → Actions.
Add:
Secret
CONTEXTQA_API_TOKEN
The one-time token value copied from ContextQA
Variable
CONTEXTQA_TEST_PLAN_ID
The plan ID shown on the ContextQA plan overview
Variable
CONTEXTQA_API_BASE_URL
The public base URL from the official contract, when supplied
Use an environment-level secret when production deployments require stricter reviewers or a different token.
Choose the workflow trigger
Select the event that matches the plan's purpose:
Pull request
Small smoke or risk-based plan before merge
Push to main
Post-merge verification
Deployment
Pre-production or post-deployment validation
Schedule
Broad regression outside the developer feedback loop
Manual dispatch
Troubleshooting and controlled reruns
Avoid running the same expensive plan on overlapping events unless the duplicate coverage is intentional.
Implement the quality gate
The generated GitHub Actions workflow includes the trigger-and-poll pattern. Review it so the job will:
Read the token from
secrets.CONTEXTQA_API_TOKENand the plan ID fromvars.CONTEXTQA_TEST_PLAN_ID.Start the plan using the published request method, path, and payload.
Store the returned run ID as a step output.
Poll the published status operation with a bounded timeout.
Fail the job for every documented non-success terminal result.
Add the run ID to the job summary and direct reviewers to the ContextQA portal.
Do not construct a deep link unless the public response returns one.
Protect the branch
After validating both pass and fail paths:
Open the repository ruleset or branch protection rule.
Require the ContextQA job's check name before merge.
Keep the workflow file and required-check name stable.
Require review for changes to the workflow when it protects production.
Security guidance
Use one token per repository or GitHub environment.
Never use a user's ContextQA password in Actions.
Mask response values that could contain sensitive test data.
Rotate the token before expiry and immediately after suspected exposure.
Add an IP allowlist only when the runner egress addresses are stable.
Troubleshooting
The workflow has no endpoint to call
The current production CI/CD tab describes the operations but does not publish their paths. Obtain the public API contract for your workspace; do not infer it.
The request returns unauthorized or forbidden
Check the token's status, expiry, permission scopes, and IP allowlist. Confirm the workflow reads the intended GitHub secret.
A passing plan does not unblock the pull request
Verify that branch protection requires the exact current job name and that the workflow runs for the target pull-request event.
Related pages
Current plan setup
Open the plan's CI / CD tab and select Open setup guide for current provider instructions. Use the displayed plan ID and a scoped CONTEXTQA_TOKEN secret. See CI/CD release gates for required permissions and failure-path validation.
Last updated
Was this helpful?
