Reduce duplication in Travis config

This commit is contained in:
Chris Wong 2017-07-29 20:01:14 +12:00
parent 7dcc7d7063
commit f1fbea181a

View file

@ -12,11 +12,12 @@ script:
printf 'Checking for tabs in %s\n' "$TRAVIS_COMMIT_RANGE" printf 'Checking for tabs in %s\n' "$TRAVIS_COMMIT_RANGE"
! git diff --name-only --diff-filter=ACMR "$TRAVIS_COMMIT_RANGE" | xargs grep $'\t' ! git diff --name-only --diff-filter=ACMR "$TRAVIS_COMMIT_RANGE" | xargs grep $'\t'
fi fi
- ( cd maud_htmlescape && cargo test --all-features ) - cargo test --all --all-features
- if command -v cargo-clippy > /dev/null; then ( cd maud_htmlescape && cargo clippy -- -D warnings ); fi - |
- ( cd maud && cargo test --all-features ) if command -v cargo-clippy > /dev/null; then
- if command -v cargo-clippy > /dev/null; then ( cd maud && cargo clippy -- -D warnings ); fi CLIPPY_STATUS=0
- ( cd maud_macros && cargo test --all-features ) for package in maud_htmlescape maud_macros maud maud_extras; do
- if command -v cargo-clippy > /dev/null; then ( cd maud_macros && cargo clippy -- -D warnings ); fi cargo clippy --manifest-path $package/Cargo.toml -- -D warnings || CLIPPY_STATUS=$?
- ( cd maud_extras && cargo test --all-features ) done
- if command -v cargo-clippy > /dev/null; then ( cd maud_extras && cargo clippy -- -D warnings ); fi (exit $CLIPPY_STATUS)
fi