From ac7242f57d9ee3290880459493ad72bcf002324f Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Wed, 25 Dec 2024 12:12:56 -0600 Subject: [PATCH] Split apart build and test CI jobs Originally, the tests required the binary produced by 'cargo build', but now that that's fixed, and the tests require code coverage instrumentation (forcing a rebuild anyways), it's better to do the build and test in parallel. --- .github/workflows/lint.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 227dd6b..b98ab36 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -44,6 +44,22 @@ jobs: run: cargo fmt -- --check --config group_imports=StdExternalCrate,imports_granularity=Module build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: clippy + - name: Setup Rust cache + uses: swatinem/rust-cache@v2 + - name: Build + run: cargo build --all-targets --all-features + - name: Clippy + run: cargo clippy --no-deps --all-targets --all-features + + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -58,10 +74,6 @@ jobs: uses: taiki-e/install-action@v2 with: tool: cargo-nextest,cargo-llvm-cov - - name: Build - run: cargo build --all-targets --all-features - - name: Clippy - run: cargo clippy --no-deps --all-targets --all-features - name: Test run: | git fetch