Skip to content

Commit 827214b

Browse files
committed
Tune GitHub Actions to improve performance and consistency
> Co-authored-by: Sasha Koss <koss@nocorp.me>
1 parent 399e7b1 commit 827214b

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

.github/actions/rust-setup/action.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,11 @@ runs:
99

1010
steps:
1111
- name: Set up Rust
12-
uses: actions-rs/toolchain@v1
12+
uses: dtolnay/rust-toolchain@stable
1313
with:
14-
toolchain: stable
15-
override: true
14+
components: clippy
1615

17-
- name: Cache cargo registry
18-
uses: actions/cache@v3
16+
- name: Cache Rust dependencies
17+
uses: Swatinem/rust-cache@v2
1918
with:
20-
path: ~/.cargo
21-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
22-
23-
- name: Cache rustup
24-
uses: actions/cache@v4
25-
with:
26-
path: ~/.rustup
27-
key: ${{ runner.os }}-rustup-${{ hashFiles('**/rust-toolchain.toml') }}
19+
cache-on-failure: true

.github/workflows/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
test:
1010
runs-on: ubuntu-latest
11+
env:
12+
CARGO_INCREMENTAL: 0
1113

1214
steps:
1315
- name: Check out repo
@@ -22,8 +24,11 @@ jobs:
2224
- name: Install cargo-nextest
2325
run: cargo install cargo-nextest --locked
2426

27+
- name: Compile tests
28+
run: cargo nextest run --no-run
29+
2530
- name: Run tests
26-
run: cargo nextest run
31+
run: cargo nextest run --no-fail-fast
2732

2833
# [TODO] Remove or reenable with practical setup
2934
# build:

0 commit comments

Comments
 (0)