Files
topgrade/ci/script.sh

23 lines
489 B
Bash
Raw Normal View History

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
cross check --target $TARGET --release --all-features
2018-06-04 22:41:08 +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
if [ -z $TRAVIS_TAG ]; then
2018-06-04 22:41:08 +03:00
main
fi