|
@@ -13,9 +13,12 @@ COPY . /joystream
|
|
|
# Build all cargo crates
|
|
|
# Ensure our tests and linter pass before actual build
|
|
|
ENV WASM_BUILD_TOOLCHAIN=nightly-2020-10-06
|
|
|
-ARG PROPOSALS_PARAMETERS
|
|
|
-ENV ALL_PROPOSALS_PARAMETERS_JSON=$PROPOSALS_PARAMETERS
|
|
|
-RUN BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings && \
|
|
|
+ARG TEST_NODE
|
|
|
+RUN echo "TEST_NODE=$TEST_NODE"
|
|
|
+RUN test -n "$TEST_NODE" && sed -i 's/MILLISECS_PER_BLOCK: Moment = 6000/MILLISECS_PER_BLOCK: Moment = 1000/' ./runtime/src/constants.rs
|
|
|
+RUN test -n "$TEST_NODE" && sed -i 's/SLOT_DURATION: Moment = 6000/SLOT_DURATION: Moment = 1000/' ./runtime/src/constants.rs
|
|
|
+RUN export ALL_PROPOSALS_PARAMETERS_JSON="$(test -n "$TEST_NODE" && cat ./tests/integration-tests/proposal-parameters.json)" &&\
|
|
|
+ BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings && \
|
|
|
cargo test --release --all && \
|
|
|
cargo build --release
|
|
|
|