From c156157a593391621a52be4b93822ce816498b0c Mon Sep 17 00:00:00 2001 From: J / Jacob Babich Date: Wed, 25 Sep 2024 14:37:21 -0400 Subject: [PATCH] ci: condense the `check`, `build`, and `test` jobs into a single job since trying it the other way taught me that this will work better with the cache --- .../workflows/check-and-build-and-test.yml | 40 ++++--------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/.github/workflows/check-and-build-and-test.yml b/.github/workflows/check-and-build-and-test.yml index 8f914fc..724e50f 100644 --- a/.github/workflows/check-and-build-and-test.yml +++ b/.github/workflows/check-and-build-and-test.yml @@ -10,39 +10,7 @@ env: CARGO_TERM_COLOR: always jobs: - check: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - - uses: Swatinem/rust-cache@v2 - - - name: Check - run: cargo check --verbose - - build: - needs: check - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - - uses: Swatinem/rust-cache@v2 - - - name: Build - run: cargo build --verbose - - test: - needs: build + check-build-and-test: runs-on: ubuntu-latest timeout-minutes: 15 steps: @@ -56,5 +24,11 @@ jobs: - uses: Swatinem/rust-cache@v2 + - name: Check + run: cargo check --verbose + + - name: Build + run: cargo build --verbose + - name: Run tests run: cargo nextest run