mirror of
https://github.com/nushell/nushell.git
synced 2024-12-23 15:39:06 +01:00
Fix CI to run doctests again (#5410)
The faster `cargo nextest` currently doesn't support running the doctests. Thus, add an additional step for them with cargo's default test runner. - Fix doctests for the `nu-pretty-hex` crate
This commit is contained in:
parent
7c9a78d922
commit
1ca3063ac3
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
@ -17,9 +17,9 @@ jobs:
|
||||
- stable
|
||||
include:
|
||||
- style: all
|
||||
flags: '--all-features'
|
||||
flags: "--all-features"
|
||||
- style: default
|
||||
flags: ''
|
||||
flags: ""
|
||||
exclude:
|
||||
- platform: windows-latest
|
||||
style: default
|
||||
@ -41,7 +41,7 @@ jobs:
|
||||
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
with:
|
||||
key: ${{ matrix.style }}v1 # increment this to bust the cache if needed
|
||||
key: ${{ matrix.style }}v1 # increment this to bust the cache if needed
|
||||
|
||||
- name: Rustfmt
|
||||
uses: actions-rs/cargo@v1
|
||||
@ -61,7 +61,6 @@ jobs:
|
||||
command: clippy
|
||||
args: --workspace ${{ matrix.flags }} -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect
|
||||
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -72,9 +71,9 @@ jobs:
|
||||
- stable
|
||||
include:
|
||||
- style: all
|
||||
flags: '--all-features'
|
||||
flags: "--all-features"
|
||||
- style: default
|
||||
flags: ''
|
||||
flags: ""
|
||||
exclude:
|
||||
- platform: windows-latest
|
||||
style: default
|
||||
@ -96,7 +95,7 @@ jobs:
|
||||
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
with:
|
||||
key: ${{ matrix.style }}v1 # increment this to bust the cache if needed
|
||||
key: ${{ matrix.style }}v1 # increment this to bust the cache if needed
|
||||
|
||||
- uses: taiki-e/install-action@nextest
|
||||
|
||||
@ -106,6 +105,12 @@ jobs:
|
||||
command: nextest
|
||||
args: run --all ${{ matrix.flags }}
|
||||
|
||||
- name: Doctests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --workspace --doc ${{ matrix.flags }}
|
||||
|
||||
python-virtualenv:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -130,7 +135,7 @@ jobs:
|
||||
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
with:
|
||||
key: "1" # increment this to bust the cache if needed
|
||||
key: "1" # increment this to bust the cache if needed
|
||||
|
||||
- name: Install Nushell
|
||||
uses: actions-rs/cargo@v1
|
||||
@ -176,7 +181,7 @@ jobs:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
|
||||
# This job does not use rust-cache because 1) we have limited cache space, 2) even
|
||||
# This job does not use rust-cache because 1) we have limited cache space, 2) even
|
||||
# without caching, it's not the slowest job. Revisit if those facts change.
|
||||
|
||||
- name: Build nu_plugin_example
|
||||
|
@ -8,7 +8,7 @@
|
||||
//!
|
||||
//! ## Example of `simple_hex()`
|
||||
//! ```
|
||||
//! use pretty_hex::*;
|
||||
//! use nu_pretty_hex::*;
|
||||
//!
|
||||
//! let v = vec![222, 173, 190, 239, 202, 254, 32, 24];
|
||||
//! # #[cfg(feature = "alloc")]
|
||||
@ -23,7 +23,7 @@
|
||||
//! ```
|
||||
//! ## Example of `pretty_hex()`
|
||||
//! ```
|
||||
//! use pretty_hex::*;
|
||||
//! use nu_pretty_hex::*;
|
||||
//!
|
||||
//! let v = &include_bytes!("../tests/data");
|
||||
//! # #[cfg(feature = "alloc")]
|
||||
@ -40,7 +40,7 @@
|
||||
//! ```
|
||||
//! ## Example of `config_hex()`
|
||||
//! ```
|
||||
//! use pretty_hex::*;
|
||||
//! use nu_pretty_hex::*;
|
||||
//!
|
||||
//! let cfg = HexConfig {title: false, width: 8, group: 0, ..HexConfig::default() };
|
||||
//!
|
||||
|
Loading…
Reference in New Issue
Block a user