Skip to content

Commit 1b629be

Browse files
committed
chore(ci): add steps for running tests with default features
1 parent e8b4f16 commit 1b629be

File tree

1 file changed

+42
-5
lines changed

1 file changed

+42
-5
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18-
test:
18+
test-all-features:
1919
runs-on: ubuntu-latest
2020
env:
2121
CARGO_TERM_COLOR: always
@@ -41,17 +41,54 @@ jobs:
4141
cargo clean
4242
rm -rf ~/.cargo/registry
4343
rm -rf ~/.cargo/git
44-
- name: Compile unit tests
44+
- name: Compile unit tests with all features enabled
4545
run: cargo nextest run --all-targets --all-features --workspace --locked --no-run --timings
46-
- name: Run unit tests
46+
- name: Run unit tests with all features enabled
4747
run: timeout 10m cargo nextest run --no-fail-fast --all-targets --all-features --workspace --locked
48-
- name: Store timings
48+
- name: Store timings with all features enabled
4949
uses: actions/upload-artifact@v4
5050
with:
51-
name: timings
51+
name: timings-all-features
5252
path: target/cargo-timings/
5353
if-no-files-found: warn
5454

55+
test-default-features:
56+
runs-on: ubuntu-latest
57+
env:
58+
CARGO_TERM_COLOR: always
59+
steps:
60+
- name: Maximize build space
61+
uses: easimon/maximize-build-space@master
62+
with:
63+
root-reserve-mb: "3072"
64+
temp-reserve-mb: "3072"
65+
- uses: actions/checkout@v4
66+
- uses: dtolnay/rust-toolchain@stable
67+
- uses: rui314/setup-mold@v1
68+
- uses: Swatinem/rust-cache@v2
69+
with:
70+
save-if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'schedule' }}
71+
- uses: arduino/setup-protoc@v3
72+
with:
73+
repo-token: ${{ secrets.GITHUB_TOKEN }}
74+
- uses: taiki-e/install-action@nextest
75+
- name: Clear cache
76+
if: github.event_name =='schedule'
77+
run: |
78+
cargo clean
79+
rm -rf ~/.cargo/registry
80+
rm -rf ~/.cargo/git
81+
- name: Compile unit tests with default features
82+
run: cargo nextest run --all-targets --workspace --locked --no-run --timings
83+
- name: Run unit tests with default features
84+
run: timeout 10m cargo nextest run --no-fail-fast --all-targets --workspace --locked
85+
- name: Store timings with default features
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: timings-all-features
89+
path: target/cargo-timings/
90+
if-no-files-found: warn
91+
5592
clippy:
5693
runs-on: ubuntu-latest
5794
steps:

0 commit comments

Comments
 (0)