Cache Cargo in Travis.

This commit is contained in:
Sergio Benitez 2016-09-30 15:39:55 -07:00
parent a29d56c52e
commit 4595338a39
3 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,5 @@
language: rust
cache: cargo
rust:
- nightly
script: ./scripts/test.sh

View File

@ -3,10 +3,12 @@
SCRIPT_PATH=$(cd "$(dirname "$0")" ; pwd -P)
DATABASE_URL=${SCRIPT_PATH}/db/db.sql
pushd $SCRIPT_PATH
# install the diesel CLI tools
pushd $SCRIPT_PATH > /dev/null
# install the diesel CLI tools if they're not installed
if ! command -v diesel >/dev/null 2>&1; then
cargo install diesel_cli
fi
# create db/db.sql
diesel migration --database-url=$DATABASE_URL run
popd $SCRIPT_PATH
popd $SCRIPT_PATH > /dev/null

View File

@ -46,6 +46,9 @@ function check_versions_match() {
done
}
# Update dependencies first.
cargo update
build_and_test "${LIB_DIR}"
build_and_test "${CODEGEN_DIR}"
build_and_test "${CONTRIB_DIR}"