Integrate the Wix CLI into CI/CD Workflows

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.

Example: run unit tests on every pull request

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:

Copy

Replace test:unit with the name of the test script defined in your package.json.

Run other CLI commands

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.

See also

Did this help?