diff --git a/.github/workflows/rust-cs-fmt.yml b/.github/workflows/rust-cs-fmt.yml new file mode 100644 index 0000000..737d9dd --- /dev/null +++ b/.github/workflows/rust-cs-fmt.yml @@ -0,0 +1,24 @@ +name: Rust Code Style and Format Check + +on: + pull_request: + +jobs: + rustfmt_clippy: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + + - name: Run rustfmt + run: cargo fmt --all -- --check + + - name: Run clippy + run: cargo clippy --all-targets --all-features -- -D warnings diff --git a/Cargo.lock b/Cargo.lock index bf11613..a6d125a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 4 [[package]] name = "RustBot" -version = "0.4.2" +version = "0.4.5" dependencies = [ "chrono", "poise",