-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.test
More file actions
51 lines (39 loc) · 1.79 KB
/
Copy pathDockerfile.test
File metadata and controls
51 lines (39 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM common AS test-base
# ── TypeScript & vitest config ──
COPY tsconfig.base.json vitest.config.ts ./
COPY services/attestation/tsconfig.json services/attestation/
COPY services/topup/tsconfig.json services/topup/
# ── Codegen typed contract wrappers ──
COPY codegen/ codegen/
# ── Service & SDK source ──
COPY services/attestation/src/ services/attestation/src/
COPY services/topup/src/ services/topup/src/
COPY contract-deployment/src/ contract-deployment/src/
COPY sdk/src/ sdk/src/
COPY sdk/tsconfig.json sdk/
# ── Test files ──
COPY services/attestation/test/ services/attestation/test/
# ── Config examples (used by services smoke to generate runtime configs) ──
COPY services/attestation/config.example.yaml services/attestation/
COPY services/topup/config.example.yaml services/topup/
# ── Compiled contract artifacts ──
COPY --from=deploy /app/target/ target/
# ── Smoke & deploy scripts ──
COPY scripts/ scripts/
# ── Build SDK & services ──
RUN bun run --filter @nethermindeth/aztec-fpc-sdk --if-present build && \
bun run --filter @nethermindeth/aztec-fpc-attestation --if-present build && \
bun run --filter @nethermindeth/aztec-fpc-topup --if-present build
ENV NODE_ENV=development
ENV FORCE_COLOR=1
# ── AMD64: Bun test runner ──
FROM test-base AS test-amd64
ENTRYPOINT ["bun", "test", "--timeout", "900000"]
# ── ARM64: Node.js + vitest (workaround for Bun NAPI crash on ARM64) ──
# See services/ARM64_RUNTIME.md
FROM test-base AS test-arm64
COPY --from=node:24-trixie-slim /usr/local/bin/node /usr/local/bin/node
ENTRYPOINT ["node", "node_modules/.bin/vitest", "run", "--testTimeout", "900000", "--hookTimeout", "900000"]
# ── Select stage based on architecture ──
ARG TARGETARCH
FROM test-${TARGETARCH}