pre-push 676 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. set -e
  3. FEATURES=
  4. if [[ "$RUNTIME_PROFILE" == "TESTING" ]]; then
  5. FEATURES="testing_runtime"
  6. fi
  7. if [[ "$RUNTIME_PROFILE" == "STAGING" ]]; then
  8. FEATURES="staging_runtime"
  9. fi
  10. export WASM_BUILD_TOOLCHAIN=nightly-2021-02-20
  11. echo 'running clippy (rust linter)'
  12. # When custom build.rs triggers wasm-build-runner-impl to build we get error:
  13. # "Rust WASM toolchain not installed, please install it!"
  14. # So we skip building the WASM binary by setting BUILD_DUMMY_WASM_BINARY=1
  15. BUILD_DUMMY_WASM_BINARY=1 cargo +nightly-2021-02-20 clippy --release --all -- -D warnings
  16. echo 'running cargo unit tests'
  17. cargo +nightly-2021-02-20 test --release --all --features ${FEATURES}