Skip to content

Commit

Permalink
Add CI check script (#109)
Browse files Browse the repository at this point in the history
* Add ci check script

* Fix clippy lints in bin
  • Loading branch information
sonro authored Jul 16, 2024
1 parent 5895d68 commit ff0ce2a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ merged.

If you are modifying the code, make sure all tests pass. If you are adding new functionality, please add related tests.

### Discuss and update
### Discuss and update

If you receive feedback on your PR, please don't be discouraged. It's just part of the process to ensure that changes to the project are correct and necessary.

Expand All @@ -70,6 +70,8 @@ Please ensure that your PR passes the CI checks:
- [Rustdoc](https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html)
links work

If you are on a *nix system, you can use the [`scripts/cicheck.sh`](scripts/cicheck.sh) script to quickly check if you pass the CI checks.

#### Add an entry to the changelog

If your contribution changes the behavior of dotenvy, please update the
Expand Down
2 changes: 1 addition & 1 deletion dotenv/src/bin/dotenvy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn make_command(name: &str, args: Vec<&str>) -> process::Command {
command.arg(arg);
}

return command;
command
}

fn main() {
Expand Down
27 changes: 27 additions & 0 deletions scripts/cicheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env sh
set -e

MSRV="1.68.0"

echo "fmt check"
cargo fmt --all --check

echo "clippy"
cargo clippy -q --all-features --all-targets --workspace -- -D warnings

echo "build docs"
RUSTDOCFLAGS="--cfg docsrs -D warnings" cargo doc -q --no-deps --all-features --document-private-items

echo "build tests"
cargo test -q --no-run

echo "running tests..."
cargo test -q > /dev/null

echo "build tests on msrv"
RUSTUP_TOOLCHAIN="$MSRV" cargo test -q --no-run

echo "running tests on msrv..."
RUSTUP_TOOLCHAIN="$MSRV" cargo test -q > /dev/null

echo ">>>>>> ALL OK <<<<<<<<"

0 comments on commit ff0ce2a

Please sign in to comment.