Skip to content

Commit f8be974

Browse files
Use cargo nextest to speed up runs
Signed-off-by: Abhi Agarwal <[email protected]>
1 parent 80ece8f commit f8be974

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
@@ -90,19 +90,14 @@ jobs:
9090
sudo apt-get install libpq-dev -y
9191
./etl-api/scripts/run_migrations.sh
9292
93+
- name: Install cargo-nextest
94+
uses: taiki-e/install-action@v2
95+
with:
96+
tool: cargo-nextest
97+
9398
- name: Run Tests
9499
run: |
95-
cargo test \
96-
--workspace \
97-
--all-features \
98-
--no-fail-fast \
99-
--exclude etl-destinations \
100-
&& \
101-
cargo test \
102-
-p etl-destinations \
103-
--no-default-features \
104-
--no-fail-fast \
105-
--features iceberg
100+
cargo nextest run --all-features --no-fail-fast --profile no-bigquery
106101
107102
test-full:
108103
name: Tests (Full)
@@ -121,6 +116,8 @@ jobs:
121116

122117
- name: Set up Rust
123118
uses: dtolnay/[email protected]
119+
with:
120+
components: llvm-tools-preview
124121

125122
- name: Cache Cargo
126123
uses: Swatinem/rust-cache@v2
@@ -149,8 +146,10 @@ jobs:
149146
sudo apt-get install libpq-dev -y
150147
./etl-api/scripts/run_migrations.sh
151148
152-
- name: Install cargo-llvm-cov
153-
uses: taiki-e/install-action@cargo-llvm-cov
149+
- name: Install cargo-llvm-cov and cargo-nextest
150+
uses: taiki-e/install-action@v2
151+
with:
152+
tool: cargo-llvm-cov,cargo-nextest
154153

155154
- name: Set up BigQuery Credentials
156155
run: |
@@ -161,10 +160,8 @@ jobs:
161160
- name: Generate Code Coverage
162161
id: coverage
163162
run: |
164-
cargo llvm-cov test \
165-
--workspace --no-fail-fast \
166-
--all-features \
167-
--lcov --output-path lcov.info
163+
cargo llvm-cov nextest --no-fail-fast \
164+
--all-features --lcov --output-path lcov.info
168165
169166
- name: Upload Coverage to Coveralls
170167
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)