Skip to content

Commit 5cbd200

Browse files
Use cargo nextest to speed up runs
Signed-off-by: Abhi Agarwal <[email protected]>
1 parent 0e8f772 commit 5cbd200

File tree

4 files changed

+36
-19
lines changed

4 files changed

+36
-19
lines changed

.config/nextest.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[profile.no-bigquery]
2+
default-filter = "not (package(etl-destinations) and binary(/bigquery_pipeline/))"

.github/workflows/ci.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,14 @@ jobs:
8686
sudo apt-get install libpq-dev -y
8787
./etl-api/scripts/run_migrations.sh
8888
89+
- name: Install cargo-nextest
90+
uses: taiki-e/install-action@v2
91+
with:
92+
tool: cargo-nextest
93+
8994
- name: Run Tests
9095
run: |
91-
cargo test \
92-
--workspace \
93-
--all-features \
94-
--no-fail-fast \
95-
--exclude etl-destinations \
96-
&& \
97-
cargo test \
98-
-p etl-destinations \
99-
--no-default-features \
100-
--no-fail-fast \
101-
--features iceberg
96+
cargo nextest run --all-features --no-fail-fast --profile no-bigquery
10297
10398
test-full:
10499
name: Tests (Full)
@@ -117,6 +112,8 @@ jobs:
117112

118113
- name: Set up Rust
119114
uses: dtolnay/[email protected]
115+
with:
116+
components: llvm-tools-preview
120117

121118
- name: Cache Cargo
122119
uses: Swatinem/rust-cache@v2
@@ -145,8 +142,10 @@ jobs:
145142
sudo apt-get install libpq-dev -y
146143
./etl-api/scripts/run_migrations.sh
147144
148-
- name: Install cargo-llvm-cov
149-
uses: taiki-e/install-action@cargo-llvm-cov
145+
- name: Install cargo-llvm-cov and cargo-nextest
146+
uses: taiki-e/install-action@v2
147+
with:
148+
tool: cargo-llvm-cov,cargo-nextest
150149

151150
- name: Set up BigQuery Credentials
152151
run: |
@@ -157,10 +156,8 @@ jobs:
157156
- name: Generate Code Coverage
158157
id: coverage
159158
run: |
160-
cargo llvm-cov test \
161-
--workspace --no-fail-fast \
162-
--all-features \
163-
--lcov --output-path lcov.info
159+
cargo llvm-cov nextest --no-fail-fast \
160+
--all-features --lcov --output-path lcov.info
164161
165162
- name: Upload Coverage to Coveralls
166163
uses: coverallsapp/github-action@v2

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
- Tests live per crate (`src` unit tests, `tests` integration); benches in `etl-benchmarks/benches/`.
77

88
## Build and Test
9-
- Build: `cargo build --workspace --all-targets --all-features`.
10-
- Lint/format: `cargo fmt`; `cargo clippy --all-targets --all-features -- -D warnings`.
9+
- Build: `just build`.
10+
- Lint/format: `just fmt; just lint`.
1111
- Use `ENABLE_TRACING=1` when running integration tests to see the logs.
1212
- Use `RUST_LOG=[log-level]` if you need to see the logs with a specific log level.
1313

justfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
build:
2+
cargo build --workspace --all-targets --all-features
3+
4+
fmt:
5+
cargo fmt
6+
7+
lint:
8+
cargo clippy --all-targets --all-features -- -D warnings
9+
10+
test:
11+
cargo nextest run --all-features
12+
13+
test-nobigquery:
14+
cargo nextest run --all-features --profile no-bigquery
15+
16+
install-tools:
17+
cargo install cargo-nextest --locked
18+
cargo install just --locked

0 commit comments

Comments
 (0)