Skip to content

Commit

Permalink
Add clarinet deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
CAGS295 committed Oct 5, 2023
1 parent 62b10bf commit 43cfd9e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
32 changes: 28 additions & 4 deletions devenv/integration/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
FROM rust:alpine
FROM rust:bookworm as clarinet

RUN apk add --no-cache g++ musl-dev git openssl-dev clang-dev libsecp256k1-dev
RUN apt update && apt install -y pkg-config libssl-dev clang && \
rm -rf /var/lib/apt/lists/*

RUN rustup update 1.71 && rustup default 1.71
RUN cargo install clarinet-cli --bin clarinet --branch develop --locked --git https://github.com/hirosystems/clarinet.git

FROM rust:bookworm as romeo

RUN apt update && \
apt install -y libssl-dev libclang-dev libsecp256k1-dev && \
rm -rf /var/lib/apt/lists/*

RUN rustup component add rustfmt

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

COPY . .

RUN cargo nextest list
RUN cargo nextest archive --archive-file integration-tests.tar.zst

FROM rust:bookworm as runtime

RUN apt update && \
apt install -y openssl ca-certificates

COPY --from=clarinet /usr/local/cargo/bin/clarinet /usr/bin

RUN apk --no-cache add curl jq
RUN apt install -y curl jq && \
rm -rf /var/lib/apt/lists/*

RUN cargo install cargo-nextest --locked

COPY --from=romeo integration-tests.tar.zst .

COPY . .

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

Expand Down
6 changes: 5 additions & 1 deletion devenv/integration/docker/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ while [ "$(curl -s $API_URL | jq '.burn_block_height')" -lt $DEV_READY_HEIGHT ];
sleep 2
done
# any other service checks
# push contracts
cd romeo/asset-contract
clarinet deployments apply -d -p deployments/default.devnet-plan.yaml
cd -

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

0 comments on commit 43cfd9e

Please sign in to comment.