From f2f8b5e80dabf09e1a6107a1fd0e92f5c09345c1 Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Fri, 17 May 2024 15:37:29 +0200 Subject: [PATCH] wip --- .github/workflows/checks.yml | 5 +++++ justfile | 8 ++++---- rust-toolchain.toml | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 31f1d4b8..467c5733 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -5,6 +5,10 @@ on: branches: - main +concurrency: + group: ${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + jobs: clippy: name: Clippy @@ -37,6 +41,7 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: nightly + components: rustfmt cache: true cache-workspaces: true - run: just fmt diff --git a/justfile b/justfile index 50c0fa38..d6066fcd 100644 --- a/justfile +++ b/justfile @@ -1,17 +1,17 @@ build: - cargo build + cargo build --all check: - cargo check + cargo check --all fmt: - cargo +nightly fmt + cargo +nightly fmt --all clippy: cargo clippy clippy-fix: - cargo clippy --fix --allow-dirty --allow-staged + cargo clippy --all --fix --allow-dirty --allow-staged docker-up: docker compose up diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 239183c8..a24a79d2 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] channel = "1.78.0" -components = ["rustc", "cargo", "rust-std", "rust-docs", "rls", "rust-src", "rust-analysis"] +components = ["rustc", "cargo", "rust-std", "rust-docs", "rls", "rust-src", "rust-analysis", "clippy", "rustfmt"] targets = [] \ No newline at end of file