Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[profile.default]
retries = 2
slow-timeout = { period = "15s", terminate-after = 4 }

[profile.no-bigquery]
default-filter = "not (package(etl-destinations) and binary(/bigquery_pipeline/))"
31 changes: 14 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,14 @@ jobs:
sudo apt-get install libpq-dev -y
./etl-api/scripts/run_migrations.sh

- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest

- name: Run Tests
run: |
cargo test \
--workspace \
--all-features \
--no-fail-fast \
--exclude etl-destinations \
&& \
cargo test \
-p etl-destinations \
--no-default-features \
--no-fail-fast \
--features iceberg
cargo nextest run --all-features --no-fail-fast --profile no-bigquery

test-full:
name: Tests (Full)
Expand All @@ -117,6 +112,8 @@ jobs:

- name: Set up Rust
uses: dtolnay/[email protected]
with:
components: llvm-tools-preview

- name: Cache Cargo
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -145,8 +142,10 @@ jobs:
sudo apt-get install libpq-dev -y
./etl-api/scripts/run_migrations.sh

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install cargo-llvm-cov and cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov,cargo-nextest

- name: Set up BigQuery Credentials
run: |
Expand All @@ -157,10 +156,8 @@ jobs:
- name: Generate Code Coverage
id: coverage
run: |
cargo llvm-cov test \
--workspace --no-fail-fast \
--all-features \
--lcov --output-path lcov.info
cargo llvm-cov nextest --no-fail-fast \
--all-features --lcov --output-path lcov.info

- name: Upload Coverage to Coveralls
uses: coverallsapp/github-action@v2
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
- Tests live per crate (`src` unit tests, `tests` integration); benches in `etl-benchmarks/benches/`.

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

Expand Down
18 changes: 18 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
build:
cargo build --workspace --all-targets --all-features

fmt:
cargo fmt

lint:
cargo clippy --all-targets --all-features -- -D warnings

test:
cargo nextest run --all-features

test-nobigquery:
cargo nextest run --all-features --profile no-bigquery

install-tools:
cargo install cargo-nextest --locked
cargo install just --locked
Loading