diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index 6b41db8..949c6e9 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -26,30 +26,35 @@ jobs: run: | sudo apt-get update sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev - - uses: actions/checkout@v4.1.7 + - uses: actions/checkout@v4.2.2 - name: Rust cache - uses: Swatinem/rust-cache@v2.7.3 + uses: Swatinem/rust-cache@v2.7.6 with: prefix-key: cargo-${{ matrix.platform }} - name: Install components run: | rustup component add clippy rustup component add rustfmt + - name: Format Check run: cargo fmt --all -- --check - name: Lint Check run: cargo clippy --workspace -- -D warnings - - name: Test(Rust) - run: cargo test --workspace + + # https://nexte.st/docs/installation/pre-built-binaries/#using-nextest-in-github-actions + - name: Install nextest(Parallel Test Execution CLI) + uses: taiki-e/install-action@nextest + - name: Test + run: cargo nextest run --workspace - name: Sync node version - uses: actions/setup-node@v4.0.3 + uses: actions/setup-node@v4.1.0 with: node-version: 'lts/*' cache: 'npm' - name: Node.js cache - uses: actions/cache@v4.0.2 + uses: actions/cache@v4.2.0 with: path: ${{ github.workspace }}/gui/frontend/.next/cache # Generate a new cache whenever packages or source files change. @@ -84,7 +89,7 @@ jobs: mv ./target/release/bluetooth_battery_monitor ./build - name: Upload a Build Artifact - uses: actions/upload-artifact@v4.3.4 + uses: actions/upload-artifact@v4.5.0 with: name: Bluetooth Battery Monitor ${{runner.os}} path: | diff --git a/Cargo.toml b/Cargo.toml index a73b943..f128558 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ version = "0.3.1" description = "Bluetooth battery monitor" repository = "https://github.com/SARDONYX-sard/bluetooth-battery-monitor" readme = "README.md" +keywords = ["devtools"] [workspace] members = ["crates/bluetooth", "crates/timer", "gui/backend"] @@ -143,7 +144,6 @@ unnested_or_patterns = "deny" unseparated_literal_suffix = "deny" unused_self = "deny" unwrap_in_result = "deny" -unwrap_used = "deny" useless_let_if_seq = "deny" useless_transmute = "deny" verbose_file_reads = "deny" diff --git a/crates/bluetooth/Cargo.toml b/crates/bluetooth/Cargo.toml index be105db..8bc3dc9 100644 --- a/crates/bluetooth/Cargo.toml +++ b/crates/bluetooth/Cargo.toml @@ -8,6 +8,7 @@ license = "MIT OR Apache-2.0" repository.workspace = true edition = "2021" rust-version = "1.70" +keywords.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/timer/Cargo.toml b/crates/timer/Cargo.toml index f22668d..e0d50b4 100644 --- a/crates/timer/Cargo.toml +++ b/crates/timer/Cargo.toml @@ -8,6 +8,7 @@ license = "MIT OR Apache-2.0" repository.workspace = true edition = "2021" rust-version = "1.70" +keywords.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/gui/backend/Cargo.toml b/gui/backend/Cargo.toml index 3b1253d..4e9fbbd 100644 --- a/gui/backend/Cargo.toml +++ b/gui/backend/Cargo.toml @@ -8,6 +8,7 @@ license = "MIT OR Apache-2.0" repository.workspace = true edition = "2021" rust-version = "1.60" +keywords.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] @@ -54,5 +55,5 @@ tracing-appender = "0.2.3" # DO NOT REMOVE!! custom-protocol = ["tauri/custom-protocol"] -[lint] +[lints] workspace = true diff --git a/gui/backend/build.rs b/gui/backend/build.rs index d860e1e..adc155d 100644 --- a/gui/backend/build.rs +++ b/gui/backend/build.rs @@ -1,3 +1,5 @@ +#![allow(clippy::cargo_common_metadata)] + fn main() { - tauri_build::build() + tauri_build::build(); } diff --git a/gui/backend/src/main.rs b/gui/backend/src/main.rs index 909c523..9a0b84e 100644 --- a/gui/backend/src/main.rs +++ b/gui/backend/src/main.rs @@ -1,5 +1,6 @@ // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] +#![allow(clippy::cargo_common_metadata)] mod cmd; mod error;