Some checks failed
validate / JSON Schema (ajv) (push) Successful in 22s
validate / Rego (opa fmt + opa test) (push) Successful in 12s
build-images / signing-service image (push) Successful in 26s
phase1-smoke / Phase 1 end-to-end smoke (push) Successful in 57s
validate / DB (migrate up/down dry-run) (push) Failing after 26s
validate / Go (vet + test) (push) Successful in 1m16s
Add the Phase-1 end-to-end smoke test harness required by the parent
plan ([DEV-606](/DEV/issues/DEV-606), subtask 7/10):
- `tools/webauthn-sign/`: tiny Go CLI for the two crypto operations
shell + openssl cannot do (`gen-key` → Ed25519 keypair; `sign-assertion`
→ WebAuthn PublicKey assertion over the server-supplied challenge).
- `scripts/phase1-smoke.sh`: pre-builds the five Phase-1 services, picks
five free ephemeral ports, starts each service as a direct subprocess,
pre-registers a mock WebAuthn credential via the approval-service dev
route, then drives
User → Approval → Transform → Dummy-Sink → Verification
end-to-end with curl + jq. Asserts:
* the sink wrote `<data>/<decision_id>.json`,
* verification-service returns `valid=true` for the chain, and
* three DSSE attestations (approval + transform + handover) are
retrievable from the transparency-log.
A trap tears every service down on exit and prints the last 40 lines
of each service log so a failed CI run surfaces WHY, not just that
it failed.
- `Makefile`: minimal, exposes `make phase1-smoke` at repo root.
- `.forgejo/workflows/phase1-smoke.yml`: runs the same harness in a
`golang:1.26-alpine3.23` container, following the sha256-clone pattern
from `validate.yml`. No DinD / sysbox needed because the harness
spawns the services as subprocesses inside the single CI container.
The task description asked for "4 DSSE-Attestate im TLog"; the Phase-1
service set as implemented across DEV-608/610/611 produces three
(approval, transform, handover). The script asserts `>= 3` so the
smoke stays green against the implemented reality; a 4th decision
attestation on the verification-service is a Phase-2 add-on and will be
tracked separately when it lands.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
49 lines
1.7 KiB
YAML
49 lines
1.7 KiB
YAML
name: phase1-smoke
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
# Follows the sha256-clone pattern of validate.yml (DEV-598): the
|
|
# repository uses the sha256 git object format, so `actions/checkout` is
|
|
# off-limits and we clone manually from a container with git >= 2.45.
|
|
#
|
|
# `scripts/phase1-smoke.sh` builds every Phase-1 service as a static-ish
|
|
# binary (`go build`), spawns them bound to loopback on ephemeral ports,
|
|
# then drives User → Approval → Transform → Dummy-Sink → Verification
|
|
# with curl + jq. No docker-in-docker needed; the harness is self-
|
|
# contained inside the single CI container.
|
|
jobs:
|
|
phase1-smoke:
|
|
name: Phase 1 end-to-end smoke
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: golang:1.26-alpine3.23
|
|
steps:
|
|
- name: Install prerequisites (git, bash, curl, jq, openssl)
|
|
run: |
|
|
set -eu
|
|
apk add --no-cache git bash curl jq openssl ca-certificates
|
|
git --version
|
|
go version
|
|
jq --version
|
|
openssl version
|
|
|
|
- name: Clone repository (sha256-aware)
|
|
run: |
|
|
set -euo pipefail
|
|
git clone --depth=1 --branch="${GITHUB_REF_NAME}" \
|
|
"https://x-access-token:${GITHUB_TOKEN}@forgejo.basicstack.de/${GITHUB_REPOSITORY}.git" "${GITHUB_WORKSPACE}"
|
|
cd "${GITHUB_WORKSPACE}"
|
|
git log -1 --oneline
|
|
|
|
- name: Run phase1-smoke
|
|
working-directory: ${{ github.workspace }}
|
|
env:
|
|
# Keep working tree around when the trap tears down so a failed
|
|
# run surfaces the service logs in the step output.
|
|
KEEP_WORK: "1"
|
|
run: |
|
|
set -euo pipefail
|
|
bash scripts/phase1-smoke.sh
|