force PR code to be formatted

This commit is contained in:
Jorge Aparicio 2018-07-13 21:53:01 -05:00
parent 22073023d6
commit eebafc76dd
3 changed files with 6 additions and 4 deletions

View File

@ -22,6 +22,8 @@ install:
- bash ci/install.sh
script:
# code must be already formatted
- cargo fmt -- --check
- bash ci/script.sh
after_script: set +e

View File

@ -5,6 +5,8 @@ main() {
cargo install cross
fi
rustup component add rustfmt-preview
rustup target add x86_64-unknown-linux-musl
if [ $TARGET != x86_64-unknown-linux-gnu ]; then

View File

@ -10,10 +10,8 @@ main() {
# generate tests
cargo run --package test-generator --target x86_64-unknown-linux-musl
if cargo fmt --version >/dev/null 2>&1; then
# nicer syntax error messages (if any)
cargo fmt
fi
# nicer syntax error messages (if any)
cargo fmt
# run tests
cross test --target $TARGET --release