mirror of https://github.com/astral-sh/ruff
Run doctests as part of CI pipeline (#9939)
This commit is contained in:
parent
a50e2787df
commit
341c2698a7
|
|
@ -0,0 +1,8 @@
|
|||
[profile.ci]
|
||||
# Print out output for failing tests as soon as they fail, and also at the end
|
||||
# of the run (for easy scrollability).
|
||||
failure-output = "immediate-final"
|
||||
# Do not cancel the test run on the first failure.
|
||||
fail-fast = false
|
||||
|
||||
status-level = "skip"
|
||||
|
|
@ -117,10 +117,17 @@ jobs:
|
|||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-nextest
|
||||
- name: "Install cargo insta"
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-insta
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: "Run tests"
|
||||
shell: bash
|
||||
run: cargo nextest run --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 12
|
||||
env:
|
||||
NEXTEST_PROFILE: "ci"
|
||||
run: cargo insta test --all-features --unreferenced reject --test-runner nextest
|
||||
|
||||
# Check for broken links in the documentation.
|
||||
- run: cargo doc --all --no-deps
|
||||
env:
|
||||
|
|
@ -148,7 +155,9 @@ jobs:
|
|||
- uses: Swatinem/rust-cache@v2
|
||||
- name: "Run tests"
|
||||
shell: bash
|
||||
run: cargo nextest run --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 12
|
||||
run: |
|
||||
cargo nextest run --all-features --profile ci
|
||||
cargo test --all-features --doc
|
||||
|
||||
cargo-test-wasm:
|
||||
name: "cargo test (wasm)"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ license = { workspace = true }
|
|||
|
||||
[lib]
|
||||
bench = false
|
||||
doctest = false
|
||||
|
||||
[[bench]]
|
||||
name = "linter"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ repository = { workspace = true }
|
|||
license = { workspace = true }
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
ruff_text_size = { path = "../ruff_text_size" }
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ repository = { workspace = true }
|
|||
license = { workspace = true }
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
ruff_macros = { path = "../ruff_macros" }
|
||||
|
|
|
|||
|
|
@ -92,7 +92,9 @@ pub fn derive_message_formats(_attr: TokenStream, item: TokenStream) -> TokenStr
|
|||
///
|
||||
/// Good:
|
||||
///
|
||||
/// ```rust
|
||||
/// ```ignroe
|
||||
/// use ruff_macros::newtype_index;
|
||||
///
|
||||
/// #[newtype_index]
|
||||
/// #[derive(Ord, PartialOrd)]
|
||||
/// struct MyIndex;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ repository = { workspace = true }
|
|||
license = { workspace = true }
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
ruff_diagnostics = { path = "../ruff_diagnostics" }
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ repository = { workspace = true }
|
|||
license = { workspace = true }
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
ruff_python_ast = { path = "../ruff_python_ast" }
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ documentation = { workspace = true }
|
|||
repository = { workspace = true }
|
||||
license = { workspace = true }
|
||||
|
||||
[lib]
|
||||
doctest= false
|
||||
|
||||
[dependencies]
|
||||
ruff_cache = { path = "../ruff_cache" }
|
||||
ruff_formatter = { path = "../ruff_formatter" }
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ repository = { workspace = true }
|
|||
license = { workspace = true }
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
ruff_python_ast = { path = "../ruff_python_ast" }
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ documentation = { workspace = true }
|
|||
repository = { workspace = true }
|
||||
license = { workspace = true }
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
bitflags = { workspace = true }
|
||||
hexf-parse = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ repository = { workspace = true }
|
|||
license = { workspace = true }
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
log = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ repository = { workspace = true }
|
|||
license = { workspace = true }
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
ruff_index = { path = "../ruff_index" }
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ description = "WebAssembly bindings for Ruff"
|
|||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
doctest = false
|
||||
|
||||
[features]
|
||||
default = ["console_error_panic_hook"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue