Docs/CI / CD

GitLab CI

Run Assrt in a GitLab CI pipeline with the recipe below. It installs the CLI, downloads browsers, runs the suite, and publishes results as a job artifact so they are downloadable from the pipeline view.

.gitlab-ci.ymlyaml
assrt:
  image: node:20
  stage: test
  script:
    - npm ci
    - npx assrt install-browsers --with-deps
    - npx assrt run --reporter junit
  artifacts:
    when: always
    paths:
      - assrt-results/
    reports:
      junit: assrt-results/junit.xml
  variables:
    TEST_PASSWORD: $TEST_PASSWORD
Cache the browsers
Add the Playwright browser cache directory to the cache section of the job to skip re-downloading browsers on every run.