Skip to content

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.

  1. 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.

  2. Store the key as a GitHub secret

    In your GitHub repo, go to Settings → Secrets and variables → Actions → New repository secret. Name it MARRISKA_TOKEN and paste the key.

  3. Add the workflow

    Create .github/workflows/marriska.yml:

    name: Marriska tests
    on:
    pull_request:
    push:
    branches: [main]
    jobs:
    test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-node@v4
    with:
    node-version: "20"
    - run: npm install -g @marriska/runner
    - run: npx playwright install chromium --with-deps
    - run: marriska-runner run --test-set "Smoke Tests" --ci
    env:
    MARRISKA_TOKEN: ${{ secrets.MARRISKA_TOKEN }}

    The --ci flag tells the runner to skip auto-opening the report locally — exit code 0/1 drives the build status.

  4. 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.

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 }}

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.

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-reports

if: always() is the important bit — without it, a failed run skips the upload and you lose the artifact.

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.