ci: Move lints into main build
authorColin Walters <walters@verbum.org>
Thu, 31 Aug 2023 20:33:07 +0000 (16:33 -0400)
committerColin Walters <walters@verbum.org>
Thu, 31 Aug 2023 20:33:07 +0000 (16:33 -0400)
And drop another hardcoded MSRV.

.github/workflows/rust.yml

index faa44bab2ddc5e5393b7bba662897f0fdf3210a5..dd159dd96c4d3113e3dca6ca9fba225f264a59dc 100644 (file)
@@ -14,8 +14,6 @@ env:
   CARGO_PROJECT_FEATURES: "v2022_6"
   # TODO: Automatically query this from the C side
   LATEST_LIBOSTREE: "v2022_6"
-  # Pinned toolchain for linting
-  ACTION_LINTS_TOOLCHAIN: 1.64.0
 
 jobs:
   build:
@@ -25,10 +23,14 @@ jobs:
       - uses: actions/checkout@v2
       - name: Cache Dependencies
         uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
+      - name: cargo fmt (check)
+        run: cargo fmt -p ostree -- --check -l
       - name: Build
         run: cargo build --verbose --features=${{ env['CARGO_PROJECT_FEATURES'] }}
       - name: Run tests
         run: cargo test --verbose --features=${{ env['CARGO_PROJECT_FEATURES'] }}
+      - name: cargo clippy (non-gating)
+        run: cargo clippy -p ostree --features=${{ env['CARGO_PROJECT_FEATURES'] }}
   build-minimum-toolchain:
     name: "Build, minimum supported toolchain (MSRV)"
     runs-on: ubuntu-latest
@@ -83,25 +85,6 @@ jobs:
         run: cargo test --no-run --verbose --features=${{ env['LATEST_LIBOSTREE'] }}
       - name: Run tests
         run: cargo test --verbose --features=${{ env['LATEST_LIBOSTREE'] }}
-  linting:
-    name: "Lints, pinned toolchain"
-    runs-on: ubuntu-latest
-    container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@v2
-      - name: Remove system Rust toolchain
-        run: dnf remove -y rust cargo
-      - name: Install toolchain
-        uses: actions-rs/toolchain@v1
-        with:
-          toolchain: ${{ env['ACTION_LINTS_TOOLCHAIN']  }}
-          default: true
-          components: rustfmt, clippy
-      - name: cargo fmt (check)
-        run: cargo fmt -p ostree -- --check -l
-      - name: cargo clippy (warnings)
-        run: cargo clippy -p ostree --features=${{ env['CARGO_PROJECT_FEATURES'] }} -- -D warnings
   cargo-deny:
     runs-on: ubuntu-latest
     steps: