Skip to content

Add doctests (as nextest doesn't do these yet) #101

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

Merged
merged 2 commits into from
May 14, 2024

Conversation

AnotherDaniel
Copy link
Contributor

@AnotherDaniel AnotherDaniel commented May 14, 2024

As has come up recently, our check workflow doesn't yet run doctests. So this is adding an explicit doctest step.

(refer to last bullet in #84)

@AnotherDaniel AnotherDaniel requested a review from sophokles73 May 14, 2024 10:27
@AnotherDaniel AnotherDaniel added the enhancement New feature or request label May 14, 2024
@AnotherDaniel AnotherDaniel self-assigned this May 14, 2024
- name: Run doc tests
run: |
cargo test --doc --all-features
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we create JSON output from nextest, maybe we also want to create JSON output here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree - forgot to take over that bit.

- name: Run doc tests
run: |
cargo test --doc --all-features > doctestresults--all-features.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will not produce JSON output
for that, you need to provide some command line params:

RUSTC_BOOTSTRAP=1 cargo test --doc -- -Z unstable-options --format json --report-time > doctestresults--all-features.json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really shouldn't be doing this while being at a conference...

name: doctest-results
path: doctestresults--all-features.json

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing EOL

Copy link
Contributor

@sophokles73 sophokles73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AnotherDaniel AnotherDaniel merged commit 4e7ba27 into eclipse-uprotocol:main May 14, 2024
1 check passed
@AnotherDaniel AnotherDaniel deleted the doctests branch May 14, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants