mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
Faster CI (#5374)
* More-parallel CI * Split all+default caches * Rename ci job to build-clippy * cargo nextest * Remove fmt from tests
This commit is contained in:
parent
2659ea3dbd
commit
1fc7abcc38
1 changed files with 43 additions and 5 deletions
48
.github/workflows/ci.yml
vendored
48
.github/workflows/ci.yml
vendored
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue