Skip to content

Commit b3fada1

Browse files
committed
Add cargo fmt to travis build config
1 parent cce91ca commit b3fada1

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

.travis.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,26 @@ matrix:
1919
env: DO_FUZZ=true
2020
- rust: stable
2121
env: DO_FUZZ=true
22-
script: |
23-
cargo build --verbose &&
24-
cargo test --verbose &&
25-
cargo test --verbose --features serde &&
26-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo check --verbose --no-default-features) &&
27-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --features union) &&
28-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --all-features) &&
29-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo bench --verbose bench) &&
30-
([ $TRAVIS_RUST_VERSION != nightly ] || bash ./scripts/run_miri.sh) &&
31-
if [ "$DO_FUZZ" = true ]
32-
then
33-
(
34-
cd fuzz
35-
./travis-fuzz.sh
36-
)
37-
fi
22+
script:
23+
- |
24+
if [[ "$TRAVIS_RUST_VERSION" == stable ]]
25+
then
26+
rustup component add rustfmt
27+
cargo fmt --all -- --check
28+
fi
29+
- |
30+
cargo build --verbose &&
31+
cargo test --verbose &&
32+
cargo test --verbose --features serde &&
33+
([ $TRAVIS_RUST_VERSION != nightly ] || cargo check --verbose --no-default-features) &&
34+
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --features union) &&
35+
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --all-features) &&
36+
([ $TRAVIS_RUST_VERSION != nightly ] || cargo bench --verbose bench) &&
37+
([ $TRAVIS_RUST_VERSION != nightly ] || bash ./scripts/run_miri.sh) &&
38+
if [ "$DO_FUZZ" = true ]
39+
then
40+
(
41+
cd fuzz
42+
./travis-fuzz.sh
43+
)
44+
fi

0 commit comments

Comments
 (0)