Skip to content

add CI that tests the editor and publishes its image - #100

Merged
StBozov merged 1 commit into
mainfrom
add-ci-workflow-for-the-editor
Nov 1, 2026
Merged

StBozov merged 1 commit into
mainfrom
add-ci-workflow-for-the-editor

Conversation

@StBozov

@StBozov StBozov commented Nov 1, 2026

Copy link
Copy Markdown
Member

Slice S0 of the delivery plan: test, build and publish the editor image.

Workflow .github/workflows/ci.yml (renamed from run-tests.yml, which only listened to develop and master and so never ran):

  • Runs on pull requests into main and develop, and on pushes to main.
  • test job: Node 26, npm ci, compile, compile tests, mocha.
  • image job (after tests pass): builds the Dockerfile and smoke-tests it (page loads, main.js served, live-reload is 404, container is not root). Only on a push to main it logs in to GHCR with the built-in token and pushes ghcr.io/textyly/crossly-ui:main-<short-sha>-<unix-timestamp> for amd64 and arm64. Pull requests never publish.
  • Actions are pinned by commit SHA, permissions are least-privilege, credentials are not persisted, and no user-controlled value reaches a shell script. The arm64 build runs no emulated code because the final image stage has no RUN steps.

Tooling: mocha ^10.7.3 to ^12.0.3. Mocha 10 cannot start on Node 26 (its yargs dependency fails on ES module scope).

Checked locally: actionlint is clean; the test steps pass on Node 26 with the new lockfile; the smoke-test script passes against a local build.

Expected on merge: the first image is published, probably as a private package, which then needs making public.

Part of textyly/crossly#1.

Replace the old test workflow, which only listened to develop and master,
with one that runs on pull requests and on main. Tests run on Node 26.
The image job builds the Dockerfile and smoke-tests the result; a merge
to main also publishes it to the GitHub Container Registry for amd64 and
arm64. Actions are pinned by commit SHA.

Upgrade mocha to 12, because mocha 10 cannot start on Node 26.

Part of textyly/crossly#1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@StBozov
StBozov merged commit 8064a8b into main Nov 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants