forked from tscircuit/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.smoketest
More file actions
47 lines (33 loc) · 1.09 KB
/
Dockerfile.smoketest
File metadata and controls
47 lines (33 loc) · 1.09 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
FROM oven/bun:latest
# Install Node.js 22 and npm
RUN apt-get update && \
apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y nodejs
# Set working directory
WORKDIR /app
RUN npm install -g tsx
# Copy package files and install dependencies
COPY package.json bun.lock ./
RUN bun install
# Copy the rest of the code
COPY . .
# Build the package
RUN bun run build
# Pack the package
RUN bun pm pack
# Create a temporary directory for testing
RUN mkdir /tmp/testdir
RUN ./dist/cli/main.js --version
# Install the packed package globally
RUN npm install -g $(ls *.tgz)
RUN tscircuit-cli --version
# # RUN bunx --bun tscircuit-cli --version
# # Initialize a new project in the temp directory and add dependencies
RUN cd /tmp/testdir && tscircuit-cli init -y
# # Test build in the temp directory
# # RUN cd /tmp/testdir && DEBUG="tsci:eval:*" bunx --bun tscircuit-cli build index.tsx
RUN cd /tmp/testdir && tscircuit-cli build index.tsx
# # Verify build output
# RUN test -f /tmp/testdir/dist/index.circuit.json
# CMD ["bun", "run", "dev"]