Run token-bridge tests in CI
Update the dockerfile, tiltfile, and makefile so that the token-bridge tests are included when running in CI.
This commit is contained in:
parent
ff40fa34b8
commit
66f031c51b
2
Tiltfile
2
Tiltfile
|
@ -414,7 +414,7 @@ if ci_tests:
|
|||
name = "solana-tests",
|
||||
deps = ["solana"],
|
||||
dir = "solana",
|
||||
cmd = "tilt docker build -- -f Dockerfile --target ci_tests .",
|
||||
cmd = "tilt docker build -- -f Dockerfile --target ci_tests --build-arg BRIDGE_ADDRESS=Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o .",
|
||||
env = {"DOCKER_BUILDKIT": "1"},
|
||||
labels = ["ci"],
|
||||
allow_parallel = True,
|
||||
|
|
|
@ -70,11 +70,24 @@ FROM solana AS ci_tests
|
|||
# This emitter address is necessary for the governance tests.
|
||||
ENV EMITTER_ADDRESS="CiByUvEcx7w2HA4VHcPCBUAFQ73Won9kB36zW9VjirSr"
|
||||
|
||||
ARG BRIDGE_ADDRESS
|
||||
RUN [ -n "${BRIDGE_ADDRESS}" ]
|
||||
|
||||
# This is a pre-built contract.
|
||||
RUN --mount=type=cache,target=target,id=test \
|
||||
mkdir -p target/deploy && \
|
||||
cp modules/token_bridge/token-metadata/spl_token_metadata.so target/deploy/
|
||||
|
||||
RUN --mount=type=cache,target=target,id=test \
|
||||
cargo test-bpf \
|
||||
--manifest-path bridge/program/Cargo.toml \
|
||||
--features trace,instructions
|
||||
|
||||
RUN --mount=type=cache,target=target,id=test \
|
||||
cargo test-bpf \
|
||||
--manifest-path modules/token_bridge/program/Cargo.toml \
|
||||
--features trace,instructions
|
||||
|
||||
FROM scratch AS export-stage
|
||||
COPY --from=builder /opt/solana/deps /
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ deploy/nft_bridge: nft_bridge-buffer-$(NETWORK).txt
|
|||
|
||||
test:
|
||||
@echo "Running integration tests"
|
||||
DOCKER_BUILDKIT=1 docker build -f Dockerfile --target ci_tests .
|
||||
DOCKER_BUILDKIT=1 docker build -f Dockerfile --target ci_tests --build-arg BRIDGE_ADDRESS=${bridge_ADDRESS_devnet} .
|
||||
|
||||
clean:
|
||||
rm -rf artifacts-mainnet artifacts-testnet artifacts-devnet *-buffer-*.txt
|
||||
|
|
Loading…
Reference in New Issue