2018-06-04 22:41:08 +03:00
|
|
|
# This script takes care of testing your crate
|
|
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
|
|
# TODO This is the "test phase", tweak it as you see fit
|
|
|
|
|
main() {
|
2018-12-11 16:00:19 +02:00
|
|
|
cargo fmt --all -- --check
|
2019-01-21 22:38:47 +02:00
|
|
|
cross clippy --all-targets -- -D warnings
|
2019-01-01 10:20:25 +02:00
|
|
|
cross clippy --all-targets --all-features -- -D warnings
|
2019-08-14 20:11:45 +03:00
|
|
|
cross check --target $TARGET --release --all-features
|
2018-06-04 22:41:08 +03:00
|
|
|
|
2019-08-14 20:11:45 +03:00
|
|
|
if [ ! -z $DISABLE_TESTS ]; then
|
2018-06-04 22:41:08 +03:00
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
2019-05-14 16:05:21 +03:00
|
|
|
cross test
|
2018-06-04 22:41:08 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# we don't run the "test phase" when doing deploys
|
2019-08-14 20:11:45 +03:00
|
|
|
if [ -z $TRAVIS_TAG ]; then
|
2018-06-04 22:41:08 +03:00
|
|
|
main
|
|
|
|
|
fi
|