diff --git a/.github/workflows/rust.yml b/.github/workflows/tests.yml similarity index 95% rename from .github/workflows/rust.yml rename to .github/workflows/tests.yml index 3f3c4ee..dfcbf3e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: Rust +name: Tests on: [push] diff --git a/README.md b/README.md index a888d52..87ef74e 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Crates.io](https://img.shields.io/crates/v/retriever.svg)](https://crates.io/crates/retriever) [![Docs.rs](https://docs.rs/retriever/badge.svg)](https://docs.rs/retriever/latest/) +[![GitHub Actions](https://github.com/itsybitesyspider/retriever/workflows/Tests/badge.svg)](https://github.com/itsybitesyspider/retriever) ## What is it? diff --git a/bin/build b/bin/build index e874933..4db2bae 100755 --- a/bin/build +++ b/bin/build @@ -1,13 +1,8 @@ #!/usr/bin/env bash set -e -cargo check --all-features +cargo check --all-features --quiet cargo doc --all-features -cargo fmt -- --check - -cargo readme > .README.md -diff README.md .README.md - cargo build --all-features --quiet echo -e "\033[1;32mSUCCESS\033[0m" diff --git a/bin/test b/bin/test index df36792..e3fb842 100755 --- a/bin/test +++ b/bin/test @@ -17,7 +17,14 @@ cargo test --benches # Run examples cargo run --example count_records -# Fail on Warning +# Fail syntax warnings RUSTFLAGS="${RUSTFLAGS} -D warnings" cargo check --all-features +# Fail on bad cargo fmt +cargo fmt -- --check + +# Fail if README isn't up-to-date +cargo readme > .README.md +diff README.md .README.md + echo -e "\033[1;32mSUCCESS\033[0m" diff --git a/src/lib.rs b/src/lib.rs index 827d844..11b1b00 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,7 @@ //! //! [![Crates.io](https://img.shields.io/crates/v/retriever.svg)](https://crates.io/crates/retriever) //! [![Docs.rs](https://docs.rs/retriever/badge.svg)](https://docs.rs/retriever/latest/) +//! [![GitHub Actions](https://github.com/itsybitesyspider/retriever/workflows/Tests/badge.svg)](https://github.com/itsybitesyspider/retriever) //! //! # What is it? //!