ci: install rustfmt and clippy components

This commit is contained in:
thakares committed 2026-06-21 20:22:06 +05:30
1 parent b8c177bdbe
commit 3d2d291006
1 file changed
+16 -35
+16 -35
View File
@@ -1,41 +1,22 @@
name: Rust - uses: actions/checkout@v4
on: - name: Install Rust
push: uses: dtolnay/rust-toolchain@stable
branches: with:
- main toolchain: ${{ matrix.rust }}
pull_request: components: rustfmt, clippy
jobs: - name: Cache Cargo
test: uses: Swatinem/rust-cache@v2
strategy: - name: Check formatting
matrix: run: cargo fmt --check
rust:
- stable
- beta
runs-on: ubuntu-latest - name: Clippy
run: cargo clippy --all-targets -- -D warnings
steps: - name: Tests
- uses: actions/checkout@v4 run: cargo test --all
- name: Install Rust - name: Release build
uses: dtolnay/rust-toolchain@master run: cargo build --release
with:
toolchain: ${{ matrix.rust }}
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Tests
run: cargo test --all
- name: Release build
run: cargo build --release