summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-12-02 18:04:28 +0000
committerGitHub <noreply@github.com>2022-12-02 18:04:28 +0000
commit890e5f610ec650b3b3ec4ff9c5f8c4b9aa912a48 (patch)
treec4605ebcaee50d43f0591b54e0f6aedccd79b034 /.github/workflows
parentAdd missing types to tests.util. (#14597) (diff)
downloadsynapse-890e5f610ec650b3b3ec4ff9c5f8c4b9aa912a48.tar.xz
Fix Rust lint CI (#14602)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/tests.yml24
1 files changed, 23 insertions, 1 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index b687eb002d..4cb2459b37 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -109,7 +109,29 @@ jobs:
             components: clippy
       - uses: Swatinem/rust-cache@v2
 
-      - run: cargo clippy
+      - run: cargo clippy -- -D warnings
+
+  # We also lint against a nightly rustc so that we can lint the benchmark
+  # suite, which requires a nightly compiler.
+  lint-clippy-nightly:
+    runs-on: ubuntu-latest
+    needs: changes
+    if: ${{ needs.changes.outputs.rust == 'true' }}
+
+    steps:
+      - uses: actions/checkout@v3
+
+      - name: Install Rust
+        # There don't seem to be versioned releases of this action per se: for each rust
+        # version there is a branch which gets constantly rebased on top of master.
+        # We pin to a specific commit for paranoia's sake.
+        uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
+        with:
+            toolchain: nightly-2022-12-01
+            components: clippy
+      - uses: Swatinem/rust-cache@v2
+
+      - run: cargo clippy --all-features -- -D warnings
 
   lint-rustfmt:
     runs-on: ubuntu-latest