Run tests in GitHub Actions
Use GitHub Actions to start a Qodex run whenever a pull request opens or code lands onmain. The workflow below runs a smoke set against staging for pull requests and against production after merge.
Before you start
You need:- A Qodex project with runnable scenarios.
- A project API key from Settings > Platform > API keys.
- Permission to add GitHub repository secrets.
Add GitHub secrets and variables
In GitHub, open Settings > Secrets and variables > Actions.- Add secret
QODEX_API_KEYwith yourqk_...key. - Add variable
QODEX_PROJECTwith your Qodex project slug.
Add the workflow
Save this file at.github/workflows/qodex.yml.
Make it required
In GitHub branch protection formain, add the Qodex workflow as a required status check. Pull requests will not merge until the Qodex job passes.
Common adjustments
- Change
tagsfromsmoketocriticalfor a smaller gate. - Remove
tagsto run the full active suite. - Use a schedule webhook if the workflow should trigger one preconfigured policy.
- Use separate API keys for staging and production if you want independent rotation.