summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorseth <[email protected]>2024-04-19 22:44:20 -0400
committerseth <[email protected]>2024-04-19 22:44:20 -0400
commitb382d2e817a0979cb1817c54d6404309bc6bd0b6 (patch)
treeaf12e30b4a699f764d7fb9a611fb43de67766d84 /.github
parent3d07413690c551d9f034c93af85ae8da5a495e14 (diff)
ci: make clippy it's own workflow again
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yaml48
-rw-r--r--.github/workflows/clippy.yaml63
2 files changed, 63 insertions, 48 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 67371c0..44e7de3 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -33,54 +33,6 @@ jobs:
- name: Run build
run: cargo build --locked --release
- clippy:
- name: Run Clippy scan
-
- runs-on: ubuntu-latest
-
- permissions:
- security-events: write
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Install Nix
- uses: DeterminateSystems/nix-installer-action@v10
-
- - name: Setup Nix cache
- uses: DeterminateSystems/magic-nix-cache-action@v4
-
- - name: Setup Rust cache
- uses: Swatinem/rust-cache@v2
-
- - name: Install SARIF tools
- run: |
- nix profile install \
- --inputs-from ./nix/dev \
- github:getchoo/nix-exprs#{clippy-sarif,sarif-fmt}
-
- - name: Fetch Cargo deps
- run: |
- nix develop ./nix/dev#ci --command \
- cargo fetch --locked
-
- - name: Run Clippy
- continue-on-error: true
- run: |
- nix develop ./nix/dev#ci --command \
- cargo clippy \
- --all-features \
- --all-targets \
- --message-format=json \
- | clippy-sarif | tee /tmp/clippy.sarif | sarif-fmt
-
- - name: Upload results
- uses: github/codeql-action/upload-sarif@v3
- with:
- sarif_file: /tmp/clippy.sarif
- wait-for-processing: true
-
format:
name: Check formatting
diff --git a/.github/workflows/clippy.yaml b/.github/workflows/clippy.yaml
new file mode 100644
index 0000000..a37fde3
--- /dev/null
+++ b/.github/workflows/clippy.yaml
@@ -0,0 +1,63 @@
+name: Clippy
+
+on:
+ push:
+ paths:
+ - 'Cargo.toml'
+ - 'Cargo.lock'
+ - '**.rs'
+ pull_request:
+ paths:
+ - 'Cargo.toml'
+ - 'Cargo.lock'
+ - '**.rs'
+ workflow_dispatch:
+
+jobs:
+ clippy:
+ name: Run scan
+
+ runs-on: ubuntu-latest
+
+ permissions:
+ security-events: write
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v10
+
+ - name: Setup Nix cache
+ uses: DeterminateSystems/magic-nix-cache-action@v4
+
+ - name: Setup Rust cache
+ uses: Swatinem/rust-cache@v2
+
+ - name: Install SARIF tools
+ run: |
+ nix profile install \
+ --inputs-from ./nix/dev \
+ github:getchoo/nix-exprs#{clippy-sarif,sarif-fmt}
+
+ - name: Fetch Cargo deps
+ run: |
+ nix develop ./nix/dev#ci --command \
+ cargo fetch --locked
+
+ - name: Run Clippy
+ continue-on-error: true
+ run: |
+ nix develop ./nix/dev#ci --command \
+ cargo clippy \
+ --all-features \
+ --all-targets \
+ --message-format=json \
+ | clippy-sarif | tee /tmp/clippy.sarif | sarif-fmt
+
+ - name: Upload results
+ uses: github/codeql-action/upload-sarif@v3
+ with:
+ sarif_file: /tmp/clippy.sarif
+ wait-for-processing: true