Skip to content

Commit

Permalink
Add rustfmt test in ci
Browse files Browse the repository at this point in the history
- test rustfmt before running test
  • Loading branch information
yanganto committed Jan 8, 2020
1 parent 76705c2 commit 50bebde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
global:
- RUST_BACKTRACE=1
matrix:
- RUST_TOOLCHAIN=nightly TARGET=rustfmt
- RUST_TOOLCHAIN=nightly TARGET=wasm
- RUST_TOOLCHAIN=nightly TARGET=native

Expand All @@ -26,4 +27,4 @@ script:

after_script:
# Check how much free disk space left after the build
- df -h
- df -h
7 changes: 5 additions & 2 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ cargo --version
rustc --version

case $TARGET in
"native")
"rustfmt")
sudo apt-get -y update
sudo apt-get install -y cmake pkg-config libssl-dev
cargo fmt --all
;;

"native")
# Unit test
cargo test --release --all --locked "$@"
;;
Expand All @@ -28,4 +31,4 @@ case $TARGET in
# Build test
cargo build --locked "$@"
;;
esac
esac

0 comments on commit 50bebde

Please sign in to comment.