Browse Source

travis and hooks, cargo test and clippy for target

Mokhtar Naamani 4 years ago
parent
commit
a09808ccd3
2 changed files with 10 additions and 5 deletions
  1. 9 5
      .travis.yml
  2. 1 0
      devops/dockerfiles/node-and-runtime/Dockerfile

+ 9 - 5
.travis.yml

@@ -17,14 +17,12 @@ matrix:
       services: docker
 
 before_install:
-  - rustup component add rustfmt
-  - cargo fmt --all -- --check
-  - rustup component add clippy
-  - BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release -- -D warnings
   - rustup default stable
   - rustup update nightly
   - rustup target add wasm32-unknown-unknown --toolchain nightly
-  - cargo test --release --verbose --all
+  - rustup component add rustfmt
+  - rustup component add clippy
+  - cargo fmt --all -- --check
 
 install:
   - |
@@ -37,6 +35,10 @@ script:
   - |
     if [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]
     then
+      docker run -u root \
+        --volume ${TRAVIS_BUILD_DIR}:/home/cross/project \
+          joystream/rust-raspberry \
+        test --release
       docker run -u root \
         --volume ${TRAVIS_BUILD_DIR}:/home/cross/project \
           joystream/rust-raspberry \
@@ -51,6 +53,8 @@ script:
       docker cp temp-container-joystream-node:/joystream/runtime.compact.wasm joystream_runtime.wasm
       docker rm temp-container-joystream-node
     else
+      cargo test --release --verbose --all --target=${TARGET}
+      BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --target=${TARGET} -- -D warnings
       cargo build --release --target=${TARGET}
     fi
 

+ 1 - 0
devops/dockerfiles/node-and-runtime/Dockerfile

@@ -4,6 +4,7 @@ WORKDIR /joystream
 COPY . /joystream
 
 # Make sure tests pass before continuing
+RUN BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release -- -D warnings
 RUN cargo test --release
 
 # Build joystream-node and its dependencies - runtime