From 10167b4d73ccf97b08abc113dba42f6927faf972 Mon Sep 17 00:00:00 2001 From: Dongri Jin Date: Fri, 19 May 2023 11:16:40 +0900 Subject: [PATCH] Create rust-check.yml --- .github/workflows/rust-check.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/rust-check.yml diff --git a/.github/workflows/rust-check.yml b/.github/workflows/rust-check.yml new file mode 100644 index 0000000..2a59ad2 --- /dev/null +++ b/.github/workflows/rust-check.yml @@ -0,0 +1,27 @@ +name: Rust Check + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + check_fmt: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt + + - name: Check formatting + run: cargo fmt -- --check + - name: Check clippy + run: cargo clippy -- -D warnings