-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.test
45 lines (32 loc) · 1.19 KB
/
Dockerfile.test
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
FROM rustlang/rust:nightly-bullseye-slim AS build
RUN apt update -y \
&& apt upgrade -y \
&& apt install build-essential git librocksdb-dev clang cmake g++-multilib llvm llvm-dev libssl-dev pkg-config protobuf-compiler python3 -y
RUN rustup install nightly-2023-03-22 && rustup target add wasm32-unknown-unknown --toolchain nightly-2023-03-22
WORKDIR /opt/app
COPY . .
ENV RUSTFLAGS=-Dwarnings
RUN cargo fmt -- --check
# without features
RUN cargo check --color=always --tests --examples
# with runtime benchmarks
RUN cargo check --color=always --tests --examples --features runtime-benchmarks
# with try-runtime
RUN cargo check --color=always --tests --examples --features try-runtime
# clippy with all features
RUN cargo clippy --color=always --tests --examples --features runtime-benchmarks,try-runtime
RUN cargo test --release --features runtime-benchmarks,try-runtime
RUN cargo build --release
ARG ETHEREUM_RPC
ARG POLYGON_RPC
ARG BSC_RPC
ARG GNOSIS_RPC
ARG ARBITRUM_RPC
ARG GOERLI_RPC
RUN ETHEREUM_RPC=$ETHEREUM_RPC \
POLYGON_RPC=$POLYGON_RPC \
BSC_RPC=$BSC_RPC \
GNOSIS_RPC=$GNOSIS_RPC \
ARBITRUM_RPC=$ARBITRUM_RPC \
GOERLI_RPC=$GOERLI_RPC\
python3 integr_test.py