2727 description : " Choose which toolchain to test (stable, nightly, all)"
2828 required : true
2929 type : choice
30- options :
31- - stable
32- - nightly
33- - all
30+ options : [stable, nightly, all]
3431
3532env :
3633 CARGO_TERM_COLOR : always
4542 target : [x86_64-unknown-linux-gnu]
4643 toolchain : [stable]
4744 steps :
48- - uses : actions/checkout@v6
49- with :
50- fetch-depth : 0
51- repository : ${{ github.repository }}
52- ref : ${{ github.ref }}
53- token : ${{ github.token }}
45+ - name : Checkout
46+ uses : actions/checkout@v6
5447 - name : Setup Rust
5548 uses : actions-rust-lang/setup-rust-toolchain@v1
5649 with :
6154 - name : Build the workspace
6255 run : cargo build -r --locked --workspace --features full --target ${{ matrix.target }}
6356 test :
64- if : ( github.event_name == 'workflow_dispatch' && github.event.inputs.toolchain != 'nightly') || true
57+ if : github.event_name != 'workflow_dispatch' || github.event.inputs.toolchain != 'nightly'
6558 needs : build
6659 runs-on : ubuntu-latest
6760 strategy :
@@ -70,26 +63,23 @@ jobs:
7063 features : [full, default]
7164 target : [x86_64-unknown-linux-gnu]
7265 steps :
73- - uses : actions/checkout@v6
74- with :
75- fetch-depth : 0
76- repository : ${{ github.repository }}
77- ref : ${{ github.ref }}
78- token : ${{ github.token }}
66+ - name : Checkout
67+ uses : actions/checkout@v6
7968 - name : Setup Rust
8069 uses : actions-rust-lang/setup-rust-toolchain@v1
8170 with :
8271 cache-key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
8372 target : ${{ matrix.target }}
73+ toolchain : stable
74+ override : true
8475 - name : Test (default)
8576 if : matrix.features == 'default'
8677 run : cargo test -r --locked --workspace --target ${{ matrix.target}}
8778 - name : Test (${{ matrix.features }})
8879 if : matrix.features != 'default'
8980 run : cargo test -r --locked --workspace --target ${{ matrix.target}} --features ${{ matrix.features }}
9081 test_nightly :
91- if : (github.event_name == 'workflow_dispatch' && github.event.inputs.toolchain != 'stable') || true
92- continue-on-error : true
82+ if : github.event_name != 'workflow_dispatch' || github.event.inputs.toolchain != 'stable'
9383 needs : build
9484 runs-on : ubuntu-latest
9585 strategy :
9989 - all
10090 - no_std
10191 - " alloc,nightly"
102- package :
103- - rspace-traits
10492 steps :
105- - uses : actions/checkout@v6
106- with :
107- fetch-depth : 0
108- repository : ${{ github.repository }}
109- ref : ${{ github.ref }}
110- token : ${{ github.token }}
93+ - name : Checkout
94+ uses : actions/checkout@v6
11195 - name : Setup Rust
11296 uses : actions-rust-lang/setup-rust-toolchain@v1
11397 with :
@@ -116,16 +100,16 @@ jobs:
116100 override : true
117101 - name : Test (all-features)
118102 if : matrix.features == 'all'
119- run : cargo test -r --locked --all-features --package ${{ matrix.package }}
103+ run : cargo test -r --locked --all-features --workspace
120104 - name : Test (no_std)
121105 continue-on-error : true
122106 if : matrix.features == 'no_std'
123- run : cargo test -r --locked --no-default-features --package ${{ matrix.package }}
107+ run : cargo test -r --locked --no-default-features --workspace
124108 env :
125109 RUSTFLAGS : " -C panic=abort -Z panic_abort_tests"
126110 - name : Test (${{ matrix.features }})
127111 continue-on-error : true
128112 if : matrix.features != 'all' && matrix.features != 'no_std'
129- run : cargo test -r --locked --no-default-features --features ${{ matrix.features }} --package ${{ matrix.package }}
113+ run : cargo test -r --locked --no-default-features --features ${{ matrix.features }} --workspace
130114 env :
131115 RUSTFLAGS : " -C panic=abort -Z panic_abort_tests"
0 commit comments