From 29b8da5dbebd57156e3fa8accfdb5c19abbe15bf Mon Sep 17 00:00:00 2001 From: Rostyslav Tyshko Date: Wed, 2 Oct 2024 21:05:57 +0200 Subject: [PATCH] ci workflow --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b56969f..5544078 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,34 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: nightly override: true - uses: Swatinem/rust-cache@v2 - run: cargo build + + lint: + strategy: + matrix: + platform: [ ubuntu-latest ] + runs-on: ${{ matrix.platform }} + timeout-minutes: 60 + + name: lint - ${{ matrix.crate }} - ${{ matrix.platform }} + steps: + - name: Checkout sources + uses: actions/checkout@v3 + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + - name: cargo fmt + if: success() || failure() + run: cargo fmt -- --check + - name: cargo clippy + if: success() || failure() + run: | + cargo clippy --release -- -D warnings