Running tests in GitHub Actions
This guide gets marriska-runner running on every push and pull
request from a GitHub Actions workflow. About 5 minutes of clicking
through GitHub UI, plus a YAML file you commit to your repo.
-
Create an API key
Open Settings → Security → API Keys in Marriska and click Create API Key. Copy the value out of the dialog before you close it — it’s shown once, never again.
-
Store the key as a GitHub secret
In your GitHub repo, go to Settings → Secrets and variables → Actions → New repository secret. Name it
MARRISKA_TOKENand paste the key. -
Add the workflow
Create
.github/workflows/marriska.yml:name: Marriska testson:pull_request:push:branches: [main]jobs:test:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v4- uses: actions/setup-node@v4with:node-version: "20"- run: npm install -g @marriska/runner- run: npx playwright install chromium --with-deps- run: marriska-runner run --test-set "Smoke Tests" --cienv:MARRISKA_TOKEN: ${{ secrets.MARRISKA_TOKEN }}The
--ciflag tells the runner to skip auto-opening the report locally — exit code 0/1 drives the build status. -
Commit and push
The workflow fires on the next push or PR. Watch progress in the Actions tab; the same run appears in your Marriska Reports page with full screenshots and timing.
Picking what to run
Section titled “Picking what to run”The runner accepts either a test set or a single test. Use the test-set name or its UUID — both work.
- run: marriska-runner run --test-set "Smoke Tests" --ci env: MARRISKA_TOKEN: ${{ secrets.MARRISKA_TOKEN }}- run: marriska-runner run --test-set abc-123-def --ci env: MARRISKA_TOKEN: ${{ secrets.MARRISKA_TOKEN }}- run: marriska-runner run --test "Login flow" --ci env: MARRISKA_TOKEN: ${{ secrets.MARRISKA_TOKEN }}Multi-browser runs
Section titled “Multi-browser runs”Comma-separate the browsers; install the matching Playwright bundles in the same step that installs Chromium:
- run: npx playwright install chromium firefox webkit --with-deps- run: | marriska-runner run \ --test-set "Regression" \ --browsers chromium,firefox,webkit \ --parallel \ --ci env: MARRISKA_TOKEN: ${{ secrets.MARRISKA_TOKEN }}--parallel runs the browsers concurrently per test instead of
sequentially. Useful when you’ve got a few minutes to save and your
runner has the cores.
Saving the HTML report as an artifact
Section titled “Saving the HTML report as an artifact”By default the runner writes an HTML report to ./marriska-reports.
You can publish it back to the workflow run for offline review:
- name: Run tests run: marriska-runner run --test-set "Smoke" --ci env: MARRISKA_TOKEN: ${{ secrets.MARRISKA_TOKEN }}
- name: Upload report if: always() # publish even on failure uses: actions/upload-artifact@v4 with: name: marriska-report path: ./marriska-reportsif: always() is the important bit — without it, a failed run skips
the upload and you lose the artifact.
Notifying on failures
Section titled “Notifying on failures”Notification recipients live on schedules, not on the CLI runner. For CI failures, GitHub’s own status checks block the merge; if you want a separate alert channel, route the failed-workflow webhook through GitHub Actions notifications or GitHub’s email-on-failure preferences. Email-based test-set notifications from inside Marriska are configured per schedule — see Scheduling tests.
Related
Section titled “Related”- CLI reference — every flag and exit code for
marriska-runner - API keys — creating, rotating, and revoking the token this workflow needs
- Scheduling tests — for automated runs that don’t tie to a code push
- How to use your own OpenAI key — moving AI inference cost off your Marriska quota