Environment variables

Every environment variable MotionPR reads, and the Playwright variables that affect the browser download.

On this page
  1. Playwright
  2. In your config
VariableEffect
MOTIONPR_ENVSelects an entry of config.environments (same as --env)
MOTIONPR_BASE_URLOverrides baseURL (applied after environments)
MOTIONPR_BROWSER_PATHSets browser.executablePath (applied after environments)
CI (unless false), GITHUB_ACTIONS, GITLAB_CI, BUILDKITECI mode: non-interactive, no prompts, run exits 2 without a baseline
GITHUB_STEP_SUMMARYrun appends a Markdown summary to this file (disable with --no-summary)
GITHUB_SHA, GITHUB_HEAD_REF, GITHUB_REF_NAMERecorded as the capture's git commit and branch
NO_COLOR, FORCE_COLORDisable / force coloured output

Playwright

motionpr install and the browser launch use Playwright, so these apply:

VariableEffect
HTTPS_PROXYDownload Chromium through a proxy
PLAYWRIGHT_DOWNLOAD_HOSTDownload Chromium from a mirror
PLAYWRIGHT_BROWSERS_PATHWhere Chromium is installed and looked up; set it for install and run

In your config

The config file is ordinary JavaScript or TypeScript and can read any variable:

TypeScript
export default defineConfig({
  baseURL: process.env.APP_URL ?? "http://localhost:3000",
  webServer: {
    command: "npm run dev",
    url: "http://localhost:3000",
    reuseExistingServer: !process.env.CI,
  },
  scenarios: [/* … */],
});