Skip to content

Commit

Permalink
Merge pull request #171 from greyblake/fix-doc-tests
Browse files Browse the repository at this point in the history
Fix doc tests
  • Loading branch information
greyblake authored Aug 25, 2024
2 parents 9cd48dc + c767124 commit 26421c5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,28 @@ jobs:
command: test
args: --all-features

doctests:
name: Doctests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Run doctests for nutype
run: |
cd nutype
cargo test --doc --all-features
- name: Run doctests for nutype_macros
run: |
cd nutype_macros
cargo test --doc --all-features
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
Expand Down Expand Up @@ -134,4 +156,3 @@ jobs:

- name: typos-action
uses: crate-ci/[email protected]

12 changes: 9 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
all: fmt test-all clippy examples typos

test-all:
test-all: test test-features test-ui test-doc

test:
cargo test

test-features:
cargo test --features serde
cargo test --features regex
cargo test --features new_unchecked
cargo test --features schemars08
cargo test --features arbitrary
cargo test --all-features

test:
cargo test

test-ui:
cargo test --features ui

test-doc:
cd nutype && cargo test --doc --all-features
cd nutype_macros && cargo test --doc --all-features

fmt:
cargo fmt

Expand Down

0 comments on commit 26421c5

Please sign in to comment.