git-subtree-dir: ruma-api git-subtree-mainline: bb037a5c42c51567a3b9e41c2c131cef9867a4aa git-subtree-split: 2151711f64e99a5da370d48fa92795f2d4799866
30 lines
871 B
YAML
30 lines
871 B
YAML
image: archlinux
|
|
packages:
|
|
- rustup
|
|
sources:
|
|
- https://github.com/ruma/ruma-api
|
|
tasks:
|
|
- rustup: |
|
|
# We specify --profile minimal because we'd otherwise download docs
|
|
rustup toolchain install stable --profile minimal -c rustfmt -c clippy
|
|
rustup default stable
|
|
- test: |
|
|
cd ruma-api
|
|
|
|
# We don't want the build to stop on individual failure of independent
|
|
# tools, so capture tool exit codes and set the task exit code manually
|
|
set +e
|
|
|
|
cargo fmt -- --check
|
|
fmt_exit=$?
|
|
|
|
cargo clippy --all-targets --all-features -- -D warnings
|
|
clippy_exit=$?
|
|
|
|
cargo test --all-features --verbose
|
|
test_exit=$?
|
|
|
|
exit $(( $fmt_exit || $clippy_exit || $test_exit ))
|
|
# TODO: Add audit task once cargo-audit binary releases are available.
|
|
# See https://github.com/RustSec/cargo-audit/issues/66
|