Skip to content

Add test --doc to xtask test and the CI #897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
restore-keys: ${{ runner.os }}-cargo-

- name: Run tests
run: cargo nextest run
run: cargo xtask test

# test-rust-wasm:
# runs-on: ubuntu-latest
Expand Down
7 changes: 6 additions & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn print_help() {
eprintln!(
"Tasks:

build builds all languages
build builds all languages
build-wasm builds the wasm components in wasm32-unknown-unknown
build-bundled builds sqlite3 and updates the bundeled code for ffi
test runs the entire libsql test suite using nextest
Expand Down Expand Up @@ -75,9 +75,14 @@ fn build_wasm(_arg: &str) -> Result<()> {
fn run_tests(arg: &str) -> Result<()> {
println!("installing nextest");
run_cargo(&["install", "cargo-nextest"])?;

println!("running nextest run");
run_cargo(&["nextest", "run", arg])?;

// Nextest doesn't have the `--doc` flag, so we are forced to use `cargo test`.
println!("running cargo test --doc");
run_cargo(&["test", "--doc"])?;

Ok(())
}

Expand Down