diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 9b1e505..e2d3f43 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -5,8 +5,8 @@ env: RUST_VERSION: 1.81.0 jobs: - lint: - name: Lint + test: + name: Test runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -14,7 +14,7 @@ jobs: - name: Set up Rust run: | - rustup update ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }} + rustup update ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }} && rustup component add rustfmt --toolchain ${{ env.RUST_VERSION }} && rustup component add clippy --toolchain ${{ env.RUST_VERSION }} - name: Cache Cargo registry uses: actions/cache@v4 @@ -40,46 +40,17 @@ jobs: restore-keys: | ${{ runner.os }}-cargo-build- - - name: Check Formatting - run: cargo fmt --all -- --check + - name: Check + run: cargo check - - name: Run Clippy - run: cargo clippy --features depth_16,depth_20,depth_30 + - name: Check (workspace & tests) + run: cargo check --workspace --tests - test: - name: Test - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Set up Rust - run: | - rustup update ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }} && rustup component add rustfmt --toolchain ${{ env.RUST_VERSION }} && rustup component add clippy --toolchain ${{ env.RUST_VERSION }} + - name: Check (workspace, tests, benches & all features) + run: cargo check --workspace --tests --benches --all-features - - 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: Check Formatting + run: cargo fmt --all -- --check - name: Run Clippy run: cargo test --features depth_16,depth_20,depth_30