Lastest integrates with CI/CD pipelines via the CLI runner and a reusable GitHub Action.

End-to-end view: code push → PR → CI/CD pipeline → preview env or staging → Lastest visual validation → manager review → approve & merge or request changes.
Run visual regression tests from the command line:
pnpm test:visual --repo-id <id> [options]
| Flag | Description | Default |
|---|---|---|
--repo-id <id> |
Repository ID (required) | - |
--base-url <url> |
Override target URL | http://localhost:3000 |
--headless |
Run in headless mode | true |
--no-headless |
Run with visible browser | - |
--output-dir <dir> |
Screenshot output directory | ./test-output |
- name: Run Visual Tests
run: pnpm test:visual --repo-id ${{ env.REPO_ID }} --base-url http://localhost:3000
env:
REPO_ID: your-repo-id
The runner automatically captures GITHUB_HEAD_REF, GITHUB_REF_NAME, and GITHUB_SHA for git tracking.
Zero-config CI/CD integration. No local Playwright install needed -- tests run on your Lastest server via a remote runner.
- 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: 'false'
| Input | Description | Required | Default |
|---|---|---|---|
server-url |
Lastest server URL | Yes | - |
runner-token |
Runner authentication token | Yes | - |
timeout |
Build completion timeout (seconds) | No | 300 |
fail-on-changes |
Fail when visual changes detected | No | false |
| Output | Description |
|---|---|
status |
Build status (passed, failed, review_required, safe_to_merge, blocked) |
build-url |
Link to build results in Lastest |
changed-count |
Number of visual changes detected |
passed-count |
Number of passed tests |
failed-count |
Number of failed tests |
total-tests |
Total number of tests run |
Results are automatically posted to the GitHub Actions step summary.
LASTEST_SERVER_URL and LASTEST_RUNNER_TOKEN as GitHub repository secretsRun only tests affected by your code changes:
This dramatically reduces CI time for large test suites.
Configure webhooks in GitHub or GitLab to trigger builds automatically:
Results are posted back as PR/MR comments automatically.
Wiki: GitHub Integration
Wiki: Home
Wiki: Running Tests
Wiki: Scheduled Runs
Wiki: _Sidebar