Chore/clippy command #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: make clippy |