From 1fc7abcc383c2f8ec2fea24ebf9990b81bff69ad Mon Sep 17 00:00:00 2001 From: Reilly Wood <26268125+rgwood@users.noreply.github.com> Date: Fri, 29 Apr 2022 12:48:04 -0700 Subject: [PATCH] Faster CI (#5374) * More-parallel CI * Split all+default caches * Rename ci job to build-clippy * cargo nextest * Remove fmt from tests --- .github/workflows/ci.yml | 48 +++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5b56c922a..2ad3b1df99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: name: continuous-integration jobs: - ci: + build-clippy: strategy: fail-fast: false matrix: @@ -41,7 +41,7 @@ jobs: - uses: Swatinem/rust-cache@v1 with: - key: "1" # increment this to bust the cache if needed + key: ${{ matrix.style }}v1 # increment this to bust the cache if needed - name: Rustfmt uses: actions-rs/cargo@v1 @@ -61,12 +61,50 @@ jobs: command: clippy args: --workspace ${{ matrix.flags }} -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect + + test: + strategy: + fail-fast: false + matrix: + platform: [windows-latest, macos-latest, ubuntu-latest] + style: [all, default] + rust: + - stable + include: + - style: all + flags: '--all-features' + - style: default + flags: '' + exclude: + - platform: windows-latest + style: default + - platform: macos-latest + style: default + + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v2 + + - name: Setup Rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v1 + with: + key: ${{ matrix.style }}v1 # increment this to bust the cache if needed + + - uses: taiki-e/install-action@nextest + - name: Tests uses: actions-rs/cargo@v1 with: - command: test - args: --workspace ${{ matrix.flags }} - + command: nextest + args: run --all ${{ matrix.flags }} python-virtualenv: strategy: