Tests of the whole of Secretli: the server and the web app behind a gateway that routes like production, used by both clients, the browser and the command-line client. Each of those repositories tests itself; this one tests how they work together.
- Routing (
stack/routing-checks.sh): one origin, where/api/reaches the server and everything else the web app. - Command-line journeys (
cli/journeys.sh): share, look, open and delete secrets, with and without a password, a 40 MiB upload in several parts, and handing a link over with a code, checking every answer and exit code. They run with one client: the latest release, or the one under test. - The client and the browser together (
browser/): links made by one open in the other, pasted or handed over with a code. - Production (
smoke/smoke.sh): health, the version and the routing of a deployed Secretli, and that each address its name resolves to answers; optionally also a secret that expires after five minutes and a handover with a code.
The web app's own flows, the server's API and the client's commands are tested in their repositories.
Docker, Node 24 with pnpm 12, and a secretli binary:
stack/stack.sh up # the latest published images, on http://localhost:8080
stack/routing-checks.sh
SECRETLI_CLI="$(command -v secretli)" cli/journeys.sh
(cd browser && pnpm install && SECRETLI_CLI="$(command -v secretli)" pnpm test)
stack/stack.sh downWEB_IMAGE and SERVER_IMAGE replace a published image with another, such as one built from a checkout:
docker build -t secretli-server:local ../server
SERVER_IMAGE=secretli-server:local stack/stack.sh upEvery test comes from one address, so the stack's server runs with raised rate limits (RATE_LIMIT_MULTIPLIER, 100 by default); production leaves that unset. Its third-party images come from their official sources outside Docker Hub, which limits pulls; only SeaweedFS is on Docker Hub alone.
-
Whole setup (
.github/workflows/whole-setup.yml) runs on every change here and nightly, against everything at main. The component repositories call it with their own change in place of one published part:whole-setup: uses: secretli/e2e/.github/workflows/whole-setup.yml@main secrets: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} with: server_ref: ${{ github.event.pull_request.head.sha || github.sha }}
server_refandweb_refbuild that component at the ref instead of pulling its image, andcli_refbuilds the client instead of installing its latest release. Only the latest client is supported, so the journeys run with that one alone. Callers pass the organisation's Docker Hub token (secretDOCKERHUB_TOKEN, user in the variableDOCKERHUB_USERNAME) by name, a read-only login for pulling the stack's images, since Docker Hub limits anonymous pulls from shared runners; notsecrets: inherit, which would hand over every secret the caller has, the CLI's Homebrew deploy key among them. Without the token, images are pulled anonymously; a login that fails fails the run. -
Smoke (
.github/workflows/smoke.yml) checks secretli.app after every deploy, twice a day and on demand. Flux announces each Secretli deploy once it is rolled out and healthy (or, for a deploy that only deletes something, once it has deleted it), as arepository_dispatchevent (set up in pscheid92/k8s,apps/secretli/deploy-notifications.yaml); a deploy Flux reports as failed fails a run here, so it gets noticed. The smoke test checks health, the version and the routing, that every address of secretli.app answers, and shares and opens a secret that expires after five minutes and hands a link over with a code.create_secrets: falsechecks without writing to the server. -
CI runs shellcheck on the scripts.
Every repository's checks depend on this one's main branch, so changes here go through a pull request whose own run of the whole setup must pass first.