Add Clippy to CI

This commit is contained in:
Neshura 2023-12-25 15:10:42 +01:00
parent fa6f0f7707
commit f8ad83439c
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
2 changed files with 38 additions and 5 deletions

View file

@ -9,13 +9,28 @@ on:
jobs: jobs:
test: test:
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps: steps:
-
name: Add Clippy
run: rustup component add clippy
- -
name: Checking Out Repository Code name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
- -
name: Placeholder name: Set Up Cargo Cache
run: echo Placeholder Job 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 name: Check if Version in Cargo.toml matches Tag
run: | run: |
@ -31,7 +46,7 @@ jobs:
needs: test needs: test
if: success() if: success()
runs-on: docker runs-on: docker
container: rust:latest container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps: steps:
- -
name: Installing Node name: Installing Node

View file

@ -10,7 +10,25 @@ on:
jobs: jobs:
run-tests: run-tests:
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps: steps:
- -
name: Placeholder name: Add Clippy
run: echo Placeholder Job 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