mirror of
https://github.com/nushell/nushell
synced 2025-01-14 14:14:13 +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
|
name: continuous-integration
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
build-clippy:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -41,7 +41,7 @@ jobs:
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
with:
|
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
|
- name: Rustfmt
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
@ -61,12 +61,50 @@ jobs:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --workspace ${{ matrix.flags }} -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect
|
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
|
- name: Tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: nextest
|
||||||
args: --workspace ${{ matrix.flags }}
|
args: run --all ${{ matrix.flags }}
|
||||||
|
|
||||||
|
|
||||||
python-virtualenv:
|
python-virtualenv:
|
||||||
strategy:
|
strategy:
|
||||||
|
|
Loading…
Reference in a new issue