The Wix CLI can run in any continuous integration and continuous delivery (CI/CD) pipeline, so you can automate tasks like testing and building your headless project on every push or pull request. Because the CLI is a standard command-line tool, it's pipeline-agnostic — the example below uses GitHub Actions because it's widely used, but the same approach applies to GitLab CI, CircleCI, Jenkins, and other providers.
A common setup is to run your unit tests automatically on every pull request, so regressions are caught before they're merged.
This GitHub Actions workflow installs your dependencies and runs your unit test script whenever a pull request is opened or updated. Add it to your repository at .github/workflows/ci.yml:
Replace test:unit with the name of the test script defined in your package.json.
The same approach works for any CLI command. For example, you can add a step that runs wix build to confirm your project compiles as part of your checks.