Skip to content

CI / CD

The editor repository ships a GitLab CI configuration covering lint, unit tests, Playwright end-to-end tests, build, and deployment to S3-compatible storage.

Required CI/CD variables

Set these in GitLab → Settings → CI/CD → Variables. Mark sensitive values as protected and masked.

Package registries

Required by the install job to fetch the WebAwesome Pro packages. FontAwesome ships as FontAwesome Free from the public registry and needs no token.

VariableDescription
WEBAWESOME_NPM_TOKENWebAwesome Pro npm token (fallback when the Verdaccio proxy is unavailable).

End-to-end tests

The test:e2e job runs Playwright against a live GitLab instance. All variables below are loaded from the environment; locally they live in .env.test.local (gitignored).

VariableExampleDescription
TEST_GITLAB_URLhttps://git.cepharum.deBase URL of the GitLab instance used for testing.
TEST_GITLAB_TOKENglpat-…Personal access token with api scope on the test repository.
TEST_REPO_PATHsites/cratly-test-websiteNamespace + project path of the test repository.
TEST_REPO_ID238Numeric project ID (shown in GitLab → Settings → General).
TEST_REPO_BRANCHmainDefault branch of the test repository.

The preview E2E tests create their own branch, commit, and MR at the start of each run and clean up afterwards — no static MR variables are needed.

Preview origin

In CI the editor runs on http://localhost:PORT. Modern Linux kernels resolve *.localhost to the loopback address, so the derived preview origin (http://preview.localhost:PORT) works out of the box in the Playwright Docker image.

If your CI environment does not support *.localhost subdomains, set VITE_PREVIEW_ORIGIN explicitly:

VITE_PREVIEW_ORIGIN=http://preview.localhost:5173

See Preview → Preview origin for the full configuration options.

Deployment (S3)

Required only by the deploy job, which runs on main only.

VariableDescription
MC_ENDPOINTS3-compatible service endpoint URL (e.g. https://play.min.io).
MC_ACCESS_KEYAccess key with read/write permissions on the bucket.
MC_SECRET_KEYCorresponding secret key.
MC_BUCKETBucket name only, no s3:// prefix.
MC_PREFIX(optional) Key prefix inside the bucket. Defaults to the bucket root.

Local test setup

Copy .env.test.local.example (if present) or create .env.test.local at the project root with the variables from the table above. This file is gitignored and never committed.

sh
# Run unit tests
npm run test:unit

# Run Playwright E2E tests (starts the dev server automatically)
npm run test:e2e

# Interactive Playwright UI
npm run test:e2e:ui