ci: run the unit tests; build pull requests, publish only release tags
build / test (pull_request) Successful in 11s
build / build (pull_request) Successful in 1m1s

As libreshop/cms adopted: a test job pipes the source into the image's base
(the Dockerfile's first FROM, node:22-slim) and runs npm test there without
network. The image build needs it and runs for pull requests (build only)
and v* tags (published if PUBLISH_ENABLED). main no longer publishes :main
and :sha-* images; mp pins the shop image by version tag.

Refs libretech/mp#71
This commit is contained in:
2026-10-09 02:33:17 +02:00
parent 6c41faf36a
commit 0561f7ce94
2 changed files with 28 additions and 3 deletions
+7 -2
View File
@@ -3,8 +3,8 @@
Vue/Nuxt-style storefront base.
Part of the [libreshop](https://git.librete.ch/libreshop) toolkit. Image
published at `git.librete.ch/libreshop/shop` on every push to `main`
and on `v*` tags.
published at `git.librete.ch/libreshop/shop` on `v*` tags; pull requests
build it without publishing.
## Source
@@ -18,6 +18,11 @@ pulls `git.librete.ch/libreshop/shop:<pin>` instead of building locally.
docker build -t libreshop/shop:dev .
```
## Test
`npm test` runs the unit tests in `tests/unit/` on Node 22.6 or later, without
installing dependencies.
## Adapter contract
See `docker-entrypoint.sh` and `Dockerfile` for the runtime surface.