Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Commit 43cfd9e

Browse files
committed
Add clarinet deployments
1 parent 62b10bf commit 43cfd9e

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

devenv/integration/docker/Dockerfile

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
FROM rust:alpine
1+
FROM rust:bookworm as clarinet
22

3-
RUN apk add --no-cache g++ musl-dev git openssl-dev clang-dev libsecp256k1-dev
3+
RUN apt update && apt install -y pkg-config libssl-dev clang && \
4+
rm -rf /var/lib/apt/lists/*
5+
6+
RUN rustup update 1.71 && rustup default 1.71
7+
RUN cargo install clarinet-cli --bin clarinet --branch develop --locked --git https://github.com/hirosystems/clarinet.git
8+
9+
FROM rust:bookworm as romeo
10+
11+
RUN apt update && \
12+
apt install -y libssl-dev libclang-dev libsecp256k1-dev && \
13+
rm -rf /var/lib/apt/lists/*
414

515
RUN rustup component add rustfmt
616

@@ -10,9 +20,23 @@ RUN cargo install cargo-nextest --locked
1020

1121
COPY . .
1222

13-
RUN cargo nextest list
23+
RUN cargo nextest archive --archive-file integration-tests.tar.zst
24+
25+
FROM rust:bookworm as runtime
26+
27+
RUN apt update && \
28+
apt install -y openssl ca-certificates
29+
30+
COPY --from=clarinet /usr/local/cargo/bin/clarinet /usr/bin
1431

15-
RUN apk --no-cache add curl jq
32+
RUN apt install -y curl jq && \
33+
rm -rf /var/lib/apt/lists/*
34+
35+
RUN cargo install cargo-nextest --locked
36+
37+
COPY --from=romeo integration-tests.tar.zst .
38+
39+
COPY . .
1640

1741
COPY ./devenv/integration/docker/entrypoint /bin/entrypoint
1842

devenv/integration/docker/entrypoint

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ while [ "$(curl -s $API_URL | jq '.burn_block_height')" -lt $DEV_READY_HEIGHT ];
1919
sleep 2
2020
done
2121
# any other service checks
22+
# push contracts
23+
cd romeo/asset-contract
24+
clarinet deployments apply -d -p deployments/default.devnet-plan.yaml
25+
cd -
2226

2327
echo with filter: "'$@'"
24-
cargo nextest run -E "$@ and kind(test)"
28+
cargo nextest run -E "$@ and kind(test)" --archive-file integration-tests.tar.zst

0 commit comments

Comments
 (0)