CI/CD

Visual regression testing that fits any CI/CD pipeline

A reusable GitHub Action (las-team/lastest/action@main), a CLI runner, and a remote runner protocol that works in GitLab CI, Jenkins, Buildkite, CircleCI, or any container-friendly CI. Smart Run uses git diff to skip unchanged tests and keep CI minutes under control.

Try Lastest free →Read the docs

What you get

Three things this integration does - and what they mean for your team.

01

Reusable GitHub Action

las-team/lastest/action@main. server-url and runner-token inputs, no local Playwright install. Outputs status, build-url, and counts so downstream steps can branch on the verdict.

02

CLI runner for any pipeline

pnpm test:visual --repo-id <id> works in GitLab CI, Jenkins, Buildkite, CircleCI, or anywhere you can run a Node container. Auto-captures GITHUB_HEAD_REF / GITHUB_SHA when present.

03

Smart Run

Match a feature branch against the default branch via the GitHub or GitLab API. Lastest only runs tests touched by the diff - saving 60–95% of CI time on large suites.

How it works

Data flow, configuration, and result routing - visualised.

Diagram 1 · GitHub Action flow

How las-team/lastest/action@main runs

GitHub Actionscheckout · setuplastest action@mainserver-url + tokenPOST /api/buildsLastest queuerunner_commandsRunnerbearer pollStep summarystatus · countsenqueueclaimpoll · output
CI checkout → action calls /api/builds with runner-token → Lastest queues build → remote runner executes → action polls until done → step summary written, status output set.

Diagram 2 · Remote runner protocol

How runners pick up work without inbound ports

LASTEST SERVERREMOTE RUNNER (your network)runner_commandsDB queue/api/ws/runnerPOST · bearerlastest-runner start -t … -s …Poll every 3-5sclaim row · run · uploadPlaywright + screenshotsregisterpoll · claimdispatchresults · screenshots
Remote runners poll POST /api/ws/runner with a Bearer token. They claim queued runner_commands rows, execute Playwright, and upload screenshots + results back over the same HTTP channel.

Diagram 3 · Smart Run with git diff

Run only the tests your diff touched

feature branchHEADgit host APIdiff vs defaultchanged filesURL patterncode refsaffected testsdispatch only
Branch vs default-branch diff (via GitHub or GitLab API) → file list → URL pattern + code reference match → only affected tests dispatched. Full suite still runs on main.

Configure

Drop-in config for CI/CD (GitHub Actions, GitLab CI, Jenkins)

GitHub Actions - drop-in visual regression step

- name: Run visual regression tests
  uses: las-team/lastest/action@main
  with:
    server-url: ${{ secrets.LASTEST_SERVER_URL }}
    runner-token: ${{ secrets.LASTEST_RUNNER_TOKEN }}
    timeout: '300'
    fail-on-changes: 'true'

Frequently asked questions about Lastest + CI/CD (GitHub Actions, GitLab CI, Jenkins)

Do I need to install Playwright in CI?
No. The Lastest GitHub Action runs tests on your Lastest server via a remote runner. CI does nothing more than HTTP-poll the build.
Can I block PR merges on visual regressions?
Yes. Set fail-on-changes: true on the action and add the Lastest check to GitHub branch protection rules.
Does Smart Run work without GitHub or GitLab?
Smart Run needs a git host API to compute the diff. Without GitHub/GitLab, fall back to running the full suite on the runner - still cheap because replays are pure Playwright.
Where do remote runners run?
Anywhere - your laptop, a VPS, an internal VM, or a Kubernetes pod. They authenticate with a Bearer token and poll your Lastest server for work.
How does the runner authenticate?
Bearer tokens stored SHA256-hashed in the database. Tokens are shown once at registration; rotate them from Settings → Runners.