From f8ad83439cdaeafbc891d5b59959d98e6deab45d Mon Sep 17 00:00:00 2001 From: Neshura Date: Mon, 25 Dec 2023 15:10:42 +0100 Subject: [PATCH] Add Clippy to CI --- .forgejo/workflows/build+release.yml | 21 ++++++++++++++++++--- .forgejo/workflows/test.yml | 22 ++++++++++++++++++++-- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/build+release.yml b/.forgejo/workflows/build+release.yml index a234073..300b906 100644 --- a/.forgejo/workflows/build+release.yml +++ b/.forgejo/workflows/build+release.yml @@ -9,13 +9,28 @@ on: jobs: test: runs-on: docker + container: forgejo.neshweb.net/ci-docker-images/rust-node:latest steps: + - + name: Add Clippy + run: rustup component add clippy - name: Checking Out Repository Code uses: https://code.forgejo.org/actions/checkout@v3 - - name: Placeholder - run: echo Placeholder Job + name: Set Up Cargo Cache + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - + name: Run Clippy + run: cargo clippy - name: Check if Version in Cargo.toml matches Tag run: | @@ -31,7 +46,7 @@ jobs: needs: test if: success() runs-on: docker - container: rust:latest + container: forgejo.neshweb.net/ci-docker-images/rust-node:latest steps: - name: Installing Node diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 637f42a..12dc226 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -10,7 +10,25 @@ on: jobs: run-tests: runs-on: docker + container: forgejo.neshweb.net/ci-docker-images/rust-node:latest steps: - - name: Placeholder - run: echo Placeholder Job \ No newline at end of file + name: Add Clippy + run: rustup component add clippy + - + name: Checking Out Repository Code + uses: https://code.forgejo.org/actions/checkout@v3 + - + name: Set Up Cargo Cache + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - + name: Run Clippy + run: cargo clippy \ No newline at end of file