Skip to content

Commit

Permalink
clippy test
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisLiraC committed Sep 15, 2024
1 parent 853245f commit 594609c
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/clippy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Clippy Test

on:
pull_request:


jobs:
git-diff:
runs-on: ubuntu-latest
name: 'Git Diff - Powered by Rust'
outputs:
DIFF_FILES: ${{ steps.git-diff.outputs.DIFF_FILES }}
DIFF_COUNT: ${{ steps.git-diff.outputs.DIFF_COUNT }}
steps:
- uses: actions/checkout@v4
- uses: LuisLiraC/[email protected]
id: git-diff
with:
patterns: '*.rs'

clippy-test:
runs-on: ubuntu-latest
needs: [git-diff]
if: ${{ needs.git-diff.outputs.DIFF_COUNT != 0 }}
name: Run Tests
steps:
- uses: actions/checkout@v4

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Run Tests
run: cargo clippy --color always -- -Dwarnings -W clippy::pedantic

0 comments on commit 594609c

Please sign in to comment.