Skip to main content
Your workflow makes one call to vikingQA, waits for the suite to finish, and fails when a test fails. GitHub shows that as a check, so you can require it before a merge or put your deploy step behind it. There is nothing to install in your repository. A token, a secret and the workflow file below are the whole integration.
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 VIKINGQA_TOKEN and paste the token.Or from your terminal, with the GitHub CLI:
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.
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
That is it. The next push to main starts a batch, and the job’s log holds a link to it in vikingQA while it runs.

What the file does

  • appVersion is $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-body fails 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 5 rides out a brief network error while polling. A blip does not fail your release.
  • The loop waits up to an hour. Raise 240 for a longer suite: the job waits 15 seconds 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 whether SKIPPED should pass, and add it to that line if so.
  • The two $GITHUB_OUTPUT lines 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 that needs the test job. GitHub does not start it unless the suite passed.
To block merges instead, make the check required: repository Settings → Branches → branch protection rule → Require status checks to pass, and choose 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:
A test runs when it carries at least one of the tags you name. Write a tag as it is in your code, @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

vikingQA can also run a schedule for you, with no workflow at all. Use this form when you want the result in GitHub.

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:
The step still fails on a refusal, such as a wrong environment name. It does not fail on a failing test, because it does not wait to find out.

Comment the result on the pull request

Add this step after the one that waits. This is your own workflow commenting with your own GITHUB_TOKEN; vikingQA does not write to your repository.
The job also needs permission to write to the pull request:

When the step goes red

The full list of statuses and error codes is in the batches API reference.

Other CI systems

The same two calls work anywhere there is a shell — AWS CodeBuild, GitLab CI, Jenkins. Only the way you store the token and write the job changes. See the batches API reference for the endpoints on their own.