From 307f207d26a6004dc1b8252ef589d9a19d58da88 Mon Sep 17 00:00:00 2001 From: FroVolod <36816899+FroVolod@users.noreply.github.com> Date: Sun, 21 Jan 2024 12:25:06 +0200 Subject: [PATCH] Create code_style.yml --- .github/workflows/code_style.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/code_style.yml diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml new file mode 100644 index 0000000..f76e5ed --- /dev/null +++ b/.github/workflows/code_style.yml @@ -0,0 +1,29 @@ +name: Code Style + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + codestyle: + name: Code Style (fmt + clippy) + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + profile: minimal + components: rustfmt + - name: Check formatting + run: cargo fmt --all -- --check + - name: Check lints (cargo clippy) + run: cargo clippy -- -D warnings