vikingQA runs the tests from the repository connected to your project, at the
branch your environment names — not from a checkout in this workflow. So the
job needs no
actions/checkout, no Node.js and no Playwright. curl and jq
are already on GitHub’s ubuntu-latest runners.Before you start
Two things your project needs, each set up once:
You also need to be an organisation admin to create the token in step 1. A
token starts test runs with nobody watching, so creating one is an admin
action.
Set it up
1
Create a project API token
Open Project settings → API tokens and create one. Name it after the
pipeline that will use it, such as
github-actions, so you know what to
revoke later.The token is shown once, when you create it. Copy it straight into step 2 —
you cannot read it again.A token belongs to one project and can do two things: start batches in that
project, and read that project’s batches.2
Store it as a GitHub secret
In the repository that holds your workflow, go to Settings → Secrets and
variables → Actions → New repository secret. Name it Never put the token in the workflow file itself. A workflow file is part of
your repository, and anyone who can read the repository can read it.
VIKINGQA_TOKEN and
paste the token.Or from your terminal, with the GitHub CLI:3
Add the workflow
Create
.github/workflows/vikingqa.yml with the file below, change
ENVIRONMENT to the name of your environment, and push it..github/workflows/vikingqa.yml
main starts a batch, and the job’s log holds a
link to it in vikingQA while it runs.
What the file does
appVersionis$GITHUB_SHA. vikingQA records it on the batch and shows it back to you, so you can tell which build a result is about. Any string your pipeline has works — a release tag, a build number.--fail-with-bodyfails the step on any refusal and prints why, so a wrong environment name is a red step with a readable message rather than a silent pass.--retry 5rides out a brief network error while polling. A blip does not fail your release.- The loop waits up to an hour. Raise
240for a longer suite: the job waits15seconds per turn, and GitHub’s own ceiling is six hours per job. - The last line passes only on
PASSED. Anything else fails the step, including a suite still running when the hour is up. Decide for yourself whetherSKIPPEDshould pass, and add it to that line if so. - The two
$GITHUB_OUTPUTlines carry the result to any later step, which is what the pull-request comment below reads.
Gate a deploy on the result
Put your deploy in a second job thatneeds the test job. GitHub does not
start it unless the suite passed.
test.
Variations
Each of these is a change to the file above, not a new file.Run only your smoke tests on a pull request
Run a tagged subset on pull requests, where you want an answer in minutes. Two changes to the file:@smoke, or without the @ — both select the same tests.
Leave tags out to run everything.
If no test carries the tag, the batch fails rather than passing with
nothing tested.
To keep the whole suite on main as well, put this version in a second
workflow file rather than adding a trigger to the first: one file cannot send
tags for one event and not the other without a condition on every line that
uses it.
On a pull_request event $GITHUB_SHA is the merge commit GitHub builds, not
the head of your branch. Use ${{ github.event.pull_request.head.sha }} if you
want the commit you pushed recorded as the application version.
Run the whole suite every night
Start it and move on
Drop the wait when your team reads the results in vikingQA rather than gating on them. The whole step becomes:Comment the result on the pull request
Add this step after the one that waits. This is your own workflow commenting with your ownGITHUB_TOKEN; vikingQA does not write to your repository.
When the step goes red
The full list of statuses and error codes is in the
batches API reference.