image: "rust" tests: script: - cargo test format: before_script: - rustup component add rustfmt script: - cargo fmt -- --check clippy: before_script: - rustup component add clippy script: - if cargo clippy 2>&1 | tee /dev/stderr | egrep "^(warning|error):" >/dev/null ; then exit 1 ; else exit 0 ; fi