Add automatic PR checks
This adds automatic checks for each PR:
-
cargo clippy -
cargo fmt(checks thatcargo fmtis a no-op) -
cargo msrv(verifies that minimum supported Rust version is what is set asrust-versionin Cargo.toml) -
cargo test
This also sets GitHub’s dependabot to check for updates to the GitHub actions used monthly.
Currently, the crate works on any version of Rust from 1.56 on up. This sets rust-version in Cargo.toml so that any change to the minimum supported Rust version (MSRV) will be noticed.
Finally, this removes the rust-toolchain file and adds it to .gitignore. This allows the crate to be developed on any version of Rust ≥1.56.
Fixes: #17 — Set up continious integration
This is close to what I use in my crates[^1], so it was easy to adapt. If you don’t like it at all, it’s no problem to just discard. (Or modify, of course.)
[^1]: I also use cargo-deny to check dependencies for security vulnerabilities and license problems, but given that the only dependency is libc that seems a little silly. Still, I could add it without any real effort.