Skip to content

cargo test --all-targets does not run doc tests #6669

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

Open
thomaseizinger opened this issue Feb 15, 2019 · 25 comments
Open

cargo test --all-targets does not run doc tests #6669

thomaseizinger opened this issue Feb 15, 2019 · 25 comments
Labels
A-doctests Area: rustdoc --test Command-test E-medium Experience: Medium S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

Comments

@thomaseizinger
Copy link

As per title cargo test --all-targets does not run the doc tests on a crate. This is very surprising behaviour. I found this and it looks like running doc tests is done by rustdoc which is apparently not invoked when doing --all-targets.

@dwijnand
Copy link
Member

An attempt to fix this was made in #6671, but there's a bit of a mismatch between cargo test and doc tests that makes the issue complicated, so the PR didn't land.

@thomaseizinger
Copy link
Author

thomaseizinger commented Feb 18, 2019

Maybe it is worth to add some context to this issue.

We ran into this because we use cargo test --all-targets on Travis and usually cargo test locally.
A not-compiling doc test sneaked into a last-minute update of a PR but the build was fine since we use --all-targets on Travis.
Later on, someone complained that we have a broken master because of a non-compiling doc test.

I read some of the discussion in the #6671 and TBH, the whole --doc is a mode would be SUPER confusing.
As a user, I expect cargo test to test LESS than cargo test --all-targets since the latter has all in the name.
In addition, the documentation (--help) lists doc tests next to all the other targets.

@glts
Copy link

glts commented Nov 18, 2019

This means the command to run absolutely all tests everywhere is cargo test --workspace, not cargo test --workspace --all-targets, right?

@ehuss
Copy link
Contributor

ehuss commented Nov 18, 2019

This means the command to run absolutely all tests everywhere is cargo test --workspace, not cargo test --workspace --all-targets, right?

It depends on the structure of your packages, but in general there is currently no single command to "test everything". cargo test is intended to be the usual command. If you also want to test benchmarks and examples, you can either mark them with test=true in Cargo.toml, or run two commands (cargo test --all-targets and cargo test --doc).

BusyJay added a commit to tikv/tikv that referenced this issue Mar 6, 2020
Tests has been built slowly lately. That's because we use multiple compile
command to build tests for different crates. Things go worse when cdc is
split as a component. On my local machine, running `make test`, cargo
will be invoked 6 times. 4 of them takes minutes to finish.

The reason why we try to run multiple compile command is to get around
the problem mentioned in #6097, which is introduced when trying to
support prost and protobuf in tests at the same time. But in practice, we
don't run tests with prost. Hence overhead is introduced with just potential
benefit. In fact, after #6317, it's impossible to run tests by
`PROST=1 make test` due to rust-lang/cargo#6669.  It's still possible to
build, clippy check or release with prost.

Given that tests with PROST=1 does not work, this PR combines all the cargo
commands into single one, which save a lot of compile time.

Signed-off-by: Jay Lee <[email protected]>
zhangjinpeng87 pushed a commit to zhangjinpeng87/tikv that referenced this issue Mar 26, 2020
Tests has been built slowly lately. That's because we use multiple compile
command to build tests for different crates. Things go worse when cdc is
split as a component. On my local machine, running `make test`, cargo
will be invoked 6 times. 4 of them takes minutes to finish.

The reason why we try to run multiple compile command is to get around
the problem mentioned in tikv#6097, which is introduced when trying to
support prost and protobuf in tests at the same time. But in practice, we
don't run tests with prost. Hence overhead is introduced with just potential
benefit. In fact, after tikv#6317, it's impossible to run tests by
`PROST=1 make test` due to rust-lang/cargo#6669.  It's still possible to
build, clippy check or release with prost.

Given that tests with PROST=1 does not work, this PR combines all the cargo
commands into single one, which save a lot of compile time.

Signed-off-by: Jay Lee <[email protected]>
c1ay pushed a commit to c1ay/tikv that referenced this issue May 9, 2020
Tests has been built slowly lately. That's because we use multiple compile
command to build tests for different crates. Things go worse when cdc is
split as a component. On my local machine, running `make test`, cargo
will be invoked 6 times. 4 of them takes minutes to finish.

The reason why we try to run multiple compile command is to get around
the problem mentioned in tikv#6097, which is introduced when trying to
support prost and protobuf in tests at the same time. But in practice, we
don't run tests with prost. Hence overhead is introduced with just potential
benefit. In fact, after tikv#6317, it's impossible to run tests by
`PROST=1 make test` due to rust-lang/cargo#6669.  It's still possible to
build, clippy check or release with prost.

Given that tests with PROST=1 does not work, this PR combines all the cargo
commands into single one, which save a lot of compile time.

Signed-off-by: Jay Lee <[email protected]>
mlafeldt added a commit to mlafeldt/codebreaker-rs that referenced this issue May 15, 2020
anp added a commit to anp/moxie that referenced this issue Jul 2, 2020
anp added a commit to anp/moxie that referenced this issue Jul 3, 2020
pbougue pushed a commit to pbougue/transit_model that referenced this issue Jul 10, 2020
Running doctests and all-targets
(see rust-lang/cargo#6669)

Also bump version
pbougue pushed a commit to pbougue/transit_model that referenced this issue Jul 10, 2020
Running doctests and all-targets
(see rust-lang/cargo#6669)
jonasbb added a commit to jonasbb/serde_with that referenced this issue Jan 30, 2021
The `--all-targets` flag for `cargo test` actually DISABLES doctests.
Doctests should of course be run, so removing the flag from the CI scrips.
There is a bug report for cargo about this behavior:
rust-lang/cargo#6669

This fixes the changes done in #235 / 9a6c3bf.
0x61nas added a commit to 0x61nas/lqth that referenced this issue Dec 12, 2023
* Add one codecov

* Merge another codecov

* Merge another codecov

* Merge another codecov

* Merge another codecov

* Place codecov config under .github

* Add (only) ASAN workflow

* Add first coverage workflow

* Merge another coverage.yml

* Merge another coverage.yml

* Add first features workflow

* Merge another features workflow

* Merge another features workflow

* Merge another features workflow

* Add (only) loom workflow

* Add (only) LSAN workflow

* Add first minial workflow

* Add (only) miri workflow

* Add first msrv workflow

* Merge another msrv workflow

* Merge another msrv workflow

* Merge another msrv workflow

* Add (only) no-std workflow

* Add first os-check workflow

* Merge another os-check workflow

* Add first style workflow

* Merge another style workflow

* Merge another style workflow

* Add first test workflow

* Merge another test workflow

* Merge another test workflow

* Merge another test workflow

* Make everything use checkout@v3

* Standardize on 'main' as branch name

* Missed a submodule checkout

* Add TODOs from twitter thread

* Practice what you preach

* mv github .github

This should make it possible to have rust-ci-conf as a remote you merge
from.

* Merge safety workflows

* Catch upcoming deprecations

* More concise name for scheduled jobs

* Allow examples and binaries to require features

* Use dependabot, but only for major versions

* ignore is a list

* Notify if actions themselves are outdated

* Bump codecov/codecov-action from 2 to 3

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v2...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Move to maintained rust installer

See actions-rs/toolchain#216

* Fix install message for msrv

* Get rid of most actions-rs bits

Given that that project is unmaintained.

actions-rs/toolchain#216

* Minimal token permissions

See tokio-rs/tokio#5072

* Remove -Zmiri-tag-raw-pointers as it's now default

* Unbreak cargo hack for non-libraries (#4)

* Add action to run doctest. (#3)

`cargo test --all-features` does not run doc-tests. For more information
see rust-lang/cargo#6669.

* chore: automatically cancel superseded Actions runs (#5)

* [sanity] More robust injection of opt-level 1 (#9)

Fixes #8

* Quote MSRV version to avoid float parsing (#11)

Put 1.70 in there (for instance if you want to pin against OnceLock stabilizing) and it will actually test 1.7 as it appears github auto converts this to a float?

Putting in quotes seems to do the right thing here

* Install Openssl for Windows (#12)

* Don't install OpenSSL on Windows by default

* Bump actions/checkout from 3 to 4 (#13)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: Add documentation based on the youtube video (#10)

* Nit: Selecting direct minimal versions flag is -Zdirect-minimal-versions (#16)

* Add one codecov

* Merge another codecov

* Merge another codecov

* Merge another codecov

* Merge another codecov

* Place codecov config under .github

* Add (only) ASAN workflow

* Add first coverage workflow

* Merge another coverage.yml

* Merge another coverage.yml

* Add first features workflow

* Merge another features workflow

* Merge another features workflow

* Merge another features workflow

* Add (only) loom workflow

* Add (only) LSAN workflow

* Add first minial workflow

* Add (only) miri workflow

* Add first msrv workflow

* Merge another msrv workflow

* Merge another msrv workflow

* Merge another msrv workflow

* Add (only) no-std workflow

* Add first os-check workflow

* Merge another os-check workflow

* Add first style workflow

* Merge another style workflow

* Merge another style workflow

* Add first test workflow

* Merge another test workflow

* Merge another test workflow

* Merge another test workflow

* Make everything use checkout@v3

* Standardize on 'main' as branch name

* Missed a submodule checkout

* Add TODOs from twitter thread

* Practice what you preach

* mv github .github

This should make it possible to have rust-ci-conf as a remote you merge
from.

* Merge safety workflows

* Catch upcoming deprecations

* More concise name for scheduled jobs

* Allow examples and binaries to require features

* Use dependabot, but only for major versions

* ignore is a list

* Notify if actions themselves are outdated

* Bump codecov/codecov-action from 2 to 3

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v2...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Move to maintained rust installer

See actions-rs/toolchain#216

* Fix install message for msrv

* Get rid of most actions-rs bits

Given that that project is unmaintained.

actions-rs/toolchain#216

* Minimal token permissions

See tokio-rs/tokio#5072

* Remove -Zmiri-tag-raw-pointers as it's now default

* Unbreak cargo hack for non-libraries (#4)

* Add action to run doctest. (#3)

`cargo test --all-features` does not run doc-tests. For more information
see rust-lang/cargo#6669.

* chore: automatically cancel superseded Actions runs (#5)

* [sanity] More robust injection of opt-level 1 (#9)

Fixes #8

* Quote MSRV version to avoid float parsing (#11)

Put 1.70 in there (for instance if you want to pin against OnceLock stabilizing) and it will actually test 1.7 as it appears github auto converts this to a float?

Putting in quotes seems to do the right thing here

* Install Openssl for Windows (#12)

* Don't install OpenSSL on Windows by default

* Bump actions/checkout from 3 to 4 (#13)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: Add documentation based on the youtube video (#10)

* Nit: Selecting direct minimal versions flag is -Zdirect-minimal-versions (#16)

* chore(github): create the code owners file

* chore(github): add the funding methods

* chore(github): create the issue templates

* chore(github): create the PR template

* chore(mergify): create `mergify` config

* chore(github): remove the `nostd` workflow

* chore(github): remove the `os-check` step and updated the branch name

* chore(github): create the CI workflow

* chore(github): update the branch name

* fix(workflow): disable the loom step for now

* fix(minimal-versions): set the minimal versoin of `thiserror` at 1.0.2

* fix(workflow): update the minimal rust version

* chore(codespell): create the codespell ignore file

* fix(workflow): don't try to build on windows or macos

* docs: fix typos

* chore(codespell): ignore `crate`

* fix(workflow): install X11

* fix(workflow): fix typos

* chore(mergify): disable the Dbpndabot rule

* chore(github): remove the CI workflow

* chore(github): add lint step to the test workflow

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Jon Gjengset <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tudyx <[email protected]>
Co-authored-by: Burkhard Mittelbach <[email protected]>
Co-authored-by: Simen Bekkhus <[email protected]>
Co-authored-by: James Chacon <[email protected]>
Co-authored-by: Rod Elias <[email protected]>
Co-authored-by: Josh McKinney <[email protected]>
Co-authored-by: Mathias Pius <[email protected]>
@thomaseizinger
Copy link
Author

thomaseizinger commented Dec 21, 2023

Just for some clarification, cargo has a model where there is a distinction between a target and a mode. Doctests are a mode, and that is why --all-targets by itself doesn't run them. I understand that can be confusing, isn't obvious from the documentation, and not the mental model some people have. We have talked in the past about making that more explicit (which in part would solve this issue by offering new switches to do both "run tests" and "run doctests"). I can't find that discussion offhand, but I don't think it was very deep anyway (just acknowledging that the CLI is limited and there were some ideas around a --mode flag). Perhaps that's something the testing team could tackle 😉 .

I don't know anything about the internals of cargo and I've been using Rust for close to 6 years now in a full-time setting. This is the first time I am hearing about cargo having a mode (other than the "release mode" toggled by --release).

Can we just remove the --doc flag and always include doc tests in every target that is selected, i.e. --lib, --tests, --examples etc. The usecase of only running doc tests could be served by a new flag of cargo doc: cargo doc --tests although I'd probably play it conservative and not add that one to begin with. It seems odd wanting to run only the doc tests. If doc tests are just more tests that get compiled into the crate, they could be selected via the regular filtering of test names. Perhaps they should all be under a dedicated doc module? Something like cargo test mycrate::doc::my_function_name_that_has_doc_test.

@est31
Copy link
Member

est31 commented Dec 22, 2023

Can we just remove the --doc flag and always include doc tests in every target that is selected

doctests are not unit tests, they are integration tests. In other words, they require a separate rustc process to be spawned for each snippet. On top of that, you have the rustdoc process (which isn't that neccessary, one could move the logic to extract the snippets to a place shared by rustc and rustdoc).

edit: there is the third issue, one that all integration tests face, that they can depend on the crate as an external dependency. In other words you need to compile the lib crate with #[cfg(test)] disabled.

0x61nas pushed a commit to 0x61nas/aarty that referenced this issue Jan 29, 2024
`cargo test --all-features` does not run doc-tests. For more information
see rust-lang/cargo#6669.
wfxr pushed a commit to wfxr/rlt that referenced this issue Mar 26, 2024
Merge another codecov

Merge another codecov

Merge another codecov

Merge another codecov

Place codecov config under .github

Add (only) ASAN workflow

Add first coverage workflow

Merge another coverage.yml

Merge another coverage.yml

Add first features workflow

Merge another features workflow

Merge another features workflow

Merge another features workflow

Add (only) loom workflow

Add (only) LSAN workflow

Add first minial workflow

Add (only) miri workflow

Add first msrv workflow

Merge another msrv workflow

Merge another msrv workflow

Merge another msrv workflow

Add (only) no-std workflow

Add first os-check workflow

Merge another os-check workflow

Add first style workflow

Merge another style workflow

Merge another style workflow

Add first test workflow

Merge another test workflow

Merge another test workflow

Merge another test workflow

Make everything use checkout@v3

Standardize on 'main' as branch name

Missed a submodule checkout

Add TODOs from twitter thread

Practice what you preach

mv github .github

This should make it possible to have rust-ci-conf as a remote you merge
from.

Merge safety workflows

Catch upcoming deprecations

More concise name for scheduled jobs

Allow examples and binaries to require features

Use dependabot, but only for major versions

ignore is a list

Notify if actions themselves are outdated

Bump codecov/codecov-action from 2 to 3

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v2...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Move to maintained rust installer

See actions-rs/toolchain#216

Fix install message for msrv

Get rid of most actions-rs bits

Given that that project is unmaintained.

actions-rs/toolchain#216

Minimal token permissions

See tokio-rs/tokio#5072

Remove -Zmiri-tag-raw-pointers as it's now default

Unbreak cargo hack for non-libraries (#4)

Add action to run doctest. (#3)

`cargo test --all-features` does not run doc-tests. For more information
see rust-lang/cargo#6669.

chore: automatically cancel superseded Actions runs (#5)

[sanity] More robust injection of opt-level 1 (#9)

Fixes #8

Quote MSRV version to avoid float parsing (#11)

Put 1.70 in there (for instance if you want to pin against OnceLock stabilizing) and it will actually test 1.7 as it appears github auto converts this to a float?

Putting in quotes seems to do the right thing here

Install Openssl for Windows (#12)

Don't install OpenSSL on Windows by default

Bump actions/checkout from 3 to 4 (#13)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

docs: Add documentation based on the youtube video (#10)

Nit: Selecting direct minimal versions flag is -Zdirect-minimal-versions (#16)

chore: fix typos (#17)

Remove stray trailing whitespace

replace actions-rs/clippy-check with giraffate/clippy-action (#19)

Co-authored-by: rtkay123 <[email protected]>

Semi-breaking: update codecov action

Note: this requires adding `CODECOV_TOKEN` to your GitHub repository's
secrets! See associated comment in the commit content.

Uniform capitalization
dougEfresh pushed a commit to dougEfresh/fireblocks-sdk-rs that referenced this issue Apr 26, 2024
`cargo test --all-features` does not run doc-tests. For more information
see rust-lang/cargo#6669.
robamler added a commit to bamler-lab/constriction that referenced this issue Aug 31, 2024
I accidentally removed execution of doc tests on CI when I added the
`--all-targets` switch to `cargo test` in order to run benchmarks as
tests. It turns out that `cargo test --all-targets` doesn't run doc
tests (see rust-lang/cargo#6669 ).

The solution for running both doc tests and benchmarks as tests seems to
be to leave out the `--all-target` switch and instead mark benchmarks
with `test=true` in `Cargo.toml` (see
rust-lang/cargo#6669 (comment) ).
@joshtriplett
Copy link
Member

In today's @rust-lang/cargo meeting, we agreed to try the experiment of adding an --all-targets-including-doc unstable option, initially to cargo test and then to other commands like cargo build and cargo check. We don't yet know what we should call it, but we can experiment with implementation of it.

@Veetaha
Copy link

Veetaha commented Sep 3, 2024

Ah, I know that feel. I had the same problem at work with a similar option of all that we couldn't scale to include more options.

A naming suggestion (we used a similar one as well): --all-targets-and-doc

@epage
Copy link
Contributor

epage commented Sep 3, 2024

Also, when we do build, check, and fix (and suggest for clippy to do similar), we might want to add --doc flags to them (#6424).

As for naming, one idea is to explore disambiguating the term "target" in cargo. If we rename "build target", then the --all-<something> could just have the new meaning.

We lean towards a new flag because people likely have broken doctests (as evidenced by this thread). While they would want to discover and fix them, they likely want to do it on their own timetable and not be forced to by cargo.

@joshtriplett
Copy link
Member

Note that in a future edition we could potentially make --all-targets default to this, which would make this an interim option for current editions.

ariel-miculas added a commit to ariel-miculas/ocidir-rs that referenced this issue Sep 15, 2024
`cargo test --all-features` does not run doc-tests. See
rust-lang/cargo#6669

Signed-off-by: Ariel Miculas-Trif <[email protected]>
@djc
Copy link
Contributor

djc commented Oct 1, 2024

Hmm, I wonder if we can have a project-level switch (maybe in the .cargo/config) for this? cargo c --all-features --all-targets is already pretty verbose and I'm not sure making it more onerous to do the right thing is the best way forward. So for projects that are aware of this and want to eagerly fix the doctests breakage, it would be great if we can opt-in to making --all-targets do (arguably) the right thing without waiting until 2027.

@epage
Copy link
Contributor

epage commented Oct 1, 2024

I think we're leaning towards renaming "build target" and having the new name for --all-targets include doctests. We would then not need to wait for a new edition.

@weihanglo
Copy link
Member

weihanglo commented Oct 1, 2024

Just note that there are designs needing to figure out, for the interaction between doctesting everything and a subset of doctest-able lib/example/bench/test/bin. See #6669 (comment) and the original comment #6671 (comment).

@thomaseizinger
Copy link
Author

Hmm, I wonder if we can have a project-level switch (maybe in the .cargo/config) for this?

You could maybe solve that with an alias that "does the right thing" whatever that means for you?

@orium
Copy link
Member

orium commented Oct 2, 2024

I think we're leaning towards renaming "build target" and having the new name for --all-targets include doctests. We would then not need to wait for a new edition.

@epage The idea would still be to default to the "--all-targets includes docs" in edition 2024, is that right? The new edition is just a few months away, so I would be happy just waiting for that instead of having an --all-targets-with-doc.

@epage
Copy link
Contributor

epage commented Oct 2, 2024

It is too late to introduce 2024 Edition changes. If a solution needs an Edition, it'd be 2027.

@orium
Copy link
Member

orium commented Oct 2, 2024

Ah, well, it that case it makes sense to have a new flag for "all targets and docs" 😄 .

bluthej pushed a commit to bluthej/ploc that referenced this issue Dec 29, 2024
`cargo test --all-features` does not run doc-tests. For more information
see rust-lang/cargo#6669.
jimmielovell added a commit to jimmielovell/ruts that referenced this issue Feb 6, 2025
* Add one codecov

* Merge another codecov

* Merge another codecov

* Merge another codecov

* Merge another codecov

* Place codecov config under .github

* Add (only) ASAN workflow

* Add first coverage workflow

* Merge another coverage.yml

* Merge another coverage.yml

* Add first features workflow

* Merge another features workflow

* Merge another features workflow

* Merge another features workflow

* Add (only) loom workflow

* Add (only) LSAN workflow

* Add first minial workflow

* Add (only) miri workflow

* Add first msrv workflow

* Merge another msrv workflow

* Merge another msrv workflow

* Merge another msrv workflow

* Add (only) no-std workflow

* Add first os-check workflow

* Merge another os-check workflow

* Add first style workflow

* Merge another style workflow

* Merge another style workflow

* Add first test workflow

* Merge another test workflow

* Merge another test workflow

* Merge another test workflow

* Make everything use checkout@v3

* Standardize on 'main' as branch name

* Missed a submodule checkout

* Add TODOs from twitter thread

* Practice what you preach

* mv github .github

This should make it possible to have rust-ci-conf as a remote you merge
from.

* Merge safety workflows

* Catch upcoming deprecations

* More concise name for scheduled jobs

* Allow examples and binaries to require features

* Use dependabot, but only for major versions

* ignore is a list

* Notify if actions themselves are outdated

* Bump codecov/codecov-action from 2 to 3

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v2...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Move to maintained rust installer

See actions-rs/toolchain#216

* Fix install message for msrv

* Get rid of most actions-rs bits

Given that that project is unmaintained.

actions-rs/toolchain#216

* Minimal token permissions

See tokio-rs/tokio#5072

* Remove -Zmiri-tag-raw-pointers as it's now default

* Unbreak cargo hack for non-libraries (#4)

* Add action to run doctest. (#3)

`cargo test --all-features` does not run doc-tests. For more information
see rust-lang/cargo#6669.

* chore: automatically cancel superseded Actions runs (#5)

* [sanity] More robust injection of opt-level 1 (#9)

Fixes #8

* Quote MSRV version to avoid float parsing (#11)

Put 1.70 in there (for instance if you want to pin against OnceLock stabilizing) and it will actually test 1.7 as it appears github auto converts this to a float?

Putting in quotes seems to do the right thing here

* Install Openssl for Windows (#12)

* Don't install OpenSSL on Windows by default

* Bump actions/checkout from 3 to 4 (#13)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: Add documentation based on the youtube video (#10)

* Nit: Selecting direct minimal versions flag is -Zdirect-minimal-versions (#16)

* chore: fix typos (#17)

* Remove stray trailing whitespace

* replace actions-rs/clippy-check with giraffate/clippy-action (#19)

Co-authored-by: rtkay123 <[email protected]>

* Semi-breaking: update codecov action

Note: this requires adding `CODECOV_TOKEN` to your GitHub repository's
secrets! See associated comment in the commit content.

* Uniform capitalization

* Add cargo-semver-checks

* More intelligent dependabot behaviour

* Revert "More intelligent dependabot behaviour"

This reverts commit dcf6883.

Will not work due to
dependabot/dependabot-core#10160

* documentation check with `cargo-docs-rs` (#23)

* fix shell-check (#24)

* Upgrade codecov-action to v5

See codecov/codecov-action#1645.

* remove nostd and safety workflows

* prepare for release

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Jon Gjengset <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tudyx <[email protected]>
Co-authored-by: Burkhard Mittelbach <[email protected]>
Co-authored-by: Simen Bekkhus <[email protected]>
Co-authored-by: James Chacon <[email protected]>
Co-authored-by: Rod Elias <[email protected]>
Co-authored-by: Josh McKinney <[email protected]>
Co-authored-by: Mathias Pius <[email protected]>
Co-authored-by: Anas <[email protected]>
Co-authored-by: rtkay123 <[email protected]>
Co-authored-by: rtkay123 <[email protected]>
Co-authored-by: Charles Edward Gagnon <[email protected]>
Co-authored-by: cospectrum <[email protected]>
ShellTux added a commit to ShellTux/scanner.rs that referenced this issue Apr 15, 2025
commit fabb82abd53e0052c8b70ae197a80e6203ede26d
Author: Jon Gjengset <[email protected]>
Date:   Tue Nov 19 12:08:56 2024 +0100

    Upgrade codecov-action to v5

    See codecov/codecov-action#1645.

commit c6a836118612ec10478df972f523000eb4387339
Author: cospectrum <[email protected]>
Date:   Sat Sep 14 11:18:31 2024 +0300

    fix shell-check (#24)

commit 5ed5ed26c75685740abb4af25c17b18cc091edcf
Author: Charles Edward Gagnon <[email protected]>
Date:   Sun Aug 18 03:28:39 2024 -0400

    documentation check with `cargo-docs-rs` (#23)

commit 799c99e0cf77d2289ab47e84fa3b8296cfc5beb1
Author: Jon Gjengset <[email protected]>
Date:   Sun Jul 7 10:18:50 2024 +0200

    Revert "More intelligent dependabot behaviour"

    This reverts commit dcf68836181145511a35a269e8392d0a0f0c61e1.

    Will not work due to
    dependabot/dependabot-core#10160

commit dcf68836181145511a35a269e8392d0a0f0c61e1
Author: Jon Gjengset <[email protected]>
Date:   Sun Jul 7 10:05:52 2024 +0200

    More intelligent dependabot behaviour

commit 528977532c28ad859bea7ba0cb5e6cb3e0fce56b
Author: Jon Gjengset <[email protected]>
Date:   Sun Mar 31 10:42:53 2024 +0200

    Add cargo-semver-checks

commit caa3616c250361bac585b6979e5390e403b45097
Author: Jon Gjengset <[email protected]>
Date:   Sat Feb 3 09:44:41 2024 +0100

    Uniform capitalization

commit f8f04aefdf3c756e6a769399ce2ac89979338ad0
Author: Jon Gjengset <[email protected]>
Date:   Sat Feb 3 09:31:12 2024 +0100

    Semi-breaking: update codecov action

    Note: this requires adding `CODECOV_TOKEN` to your GitHub repository's
    secrets! See associated comment in the commit content.

commit f505e09b2a145de0df7445ca0ebe1f98b52ab3bc
Author: rtkay123 <[email protected]>
Date:   Sat Jan 20 11:10:51 2024 +0200

    replace actions-rs/clippy-check with giraffate/clippy-action (#19)

    Co-authored-by: rtkay123 <[email protected]>

commit a13691528b3f1918594bfc53db8cf5ad0240c59e
Author: Jon Gjengset <[email protected]>
Date:   Sun Dec 17 18:15:06 2023 +0100

    Remove stray trailing whitespace

commit 60fdfbb65055e7e852820a75d9cf80b88d020702
Author: Anas <[email protected]>
Date:   Sun Dec 17 17:52:41 2023 +0200

    chore: fix typos (#17)

commit 3d6ab95662ede7ae2898cdc7bd5b75668c7b8ca0
Author: Mathias Pius <[email protected]>
Date:   Sat Nov 11 15:01:33 2023 +0100

    Nit: Selecting direct minimal versions flag is -Zdirect-minimal-versions (#16)

commit bfee1175f6378c9191eca0af88e068ed49d48bef
Author: Josh McKinney <[email protected]>
Date:   Sat Nov 11 01:14:12 2023 -0800

    docs: Add documentation based on the youtube video (#10)

commit deb9fd3f46de5eebd2583292362a161b1d1c56c4
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Sat Sep 9 16:21:14 2023 +0200

    Bump actions/checkout from 3 to 4 (#13)

    Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v3...v4)

    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 7c327ddf5b42f5309f564da8275c789c4a22fdbb
Author: Jon Gjengset <[email protected]>
Date:   Sun Aug 20 15:12:25 2023 +0200

    Don't install OpenSSL on Windows by default

commit c704bcc656871d37f93f79234c4d530522ac8733
Author: Rod Elias <[email protected]>
Date:   Sun Aug 20 09:40:15 2023 -0300

    Install Openssl for Windows (#12)

commit 99f108f93c4f09906a4ddd4506fa4a2cbc68169d
Author: James Chacon <[email protected]>
Date:   Sun Aug 13 03:13:38 2023 -0700

    Quote MSRV version to avoid float parsing (#11)

    Put 1.70 in there (for instance if you want to pin against OnceLock stabilizing) and it will actually test 1.7 as it appears github auto converts this to a float?

    Putting in quotes seems to do the right thing here

commit 6332a3af21a58f811a681a98cd44d0f5da8a1891
Author: Jon Gjengset <[email protected]>
Date:   Mon Apr 24 12:40:14 2023 -0700

    [sanity] More robust injection of opt-level 1 (#9)

    Fixes #8

commit 16a2c2925eb46e24208b20bca567f1e7546f4e2f
Author: Simen Bekkhus <[email protected]>
Date:   Sat Apr 8 18:57:54 2023 +0200

    chore: automatically cancel superseded Actions runs (#5)

commit 80a89195f2ac9971ecff9d422a6bb83b3f84e0bc
Author: Burkhard Mittelbach <[email protected]>
Date:   Mon Mar 20 01:18:49 2023 +0100

    Add action to run doctest. (#3)

    `cargo test --all-features` does not run doc-tests. For more information
    see rust-lang/cargo#6669.

commit 0d12c82bf4a89014643cd2b7991c63da9dd8b15b
Author: Tudyx <[email protected]>
Date:   Mon Mar 20 01:17:59 2023 +0100

    Unbreak cargo hack for non-libraries (#4)

commit 5ea59356dc9379a08dff5bf3df3c5016df2ca7f3
Author: Jon Gjengset <[email protected]>
Date:   Sun Mar 12 09:40:09 2023 -0700

    Remove -Zmiri-tag-raw-pointers as it's now default

commit a076ec1cb42e88e6444ae7f573570ec53c149074
Author: Jon Gjengset <[email protected]>
Date:   Sat Mar 11 15:08:45 2023 -0800

    Minimal token permissions

    See tokio-rs/tokio#5072

commit 9afb0e111adcd678ef06884cf737aa9e0cf135e7
Author: Jon Gjengset <[email protected]>
Date:   Sat Mar 11 15:07:39 2023 -0800

    Get rid of most actions-rs bits

    Given that that project is unmaintained.

    actions-rs/toolchain#216

commit 90999e1bd1a9dabaecd149697f69e8e26e810562
Author: Jon Gjengset <[email protected]>
Date:   Fri Mar 10 21:22:30 2023 -0800

    Fix install message for msrv

commit 362696ab8007ef1a4779885a398286856cacf555
Author: Jon Gjengset <[email protected]>
Date:   Fri Mar 10 21:16:35 2023 -0800

    Move to maintained rust installer

    See actions-rs/toolchain#216

commit d6bd5c67a444a379d70a014de537c29dc77f7711
Merge: 82cbed8 c8a7835
Author: Jon Gjengset <[email protected]>
Date:   Fri Dec 9 19:42:59 2022 -0500

    Merge pull request #1 from jonhoo/dependabot/github_actions/codecov/codecov-action-3

    Bump codecov/codecov-action from 2 to 3

commit c8a7835b2f0b21d9a64e6a8b0ddc10fbc88e2dd1
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Sat Dec 10 00:25:41 2022 +0000

    Bump codecov/codecov-action from 2 to 3

    Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3.
    - [Release notes](https://github.com/codecov/codecov-action/releases)
    - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
    - [Commits](codecov/codecov-action@v2...v3)

    ---
    updated-dependencies:
    - dependency-name: codecov/codecov-action
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...

    Signed-off-by: dependabot[bot] <[email protected]>

commit 82cbed84f82e8538cdfc99dcf1b8b2cbab4fb126
Author: Jon Gjengset <[email protected]>
Date:   Fri Dec 9 16:25:21 2022 -0800

    Notify if actions themselves are outdated

commit cf47d4cad4b241a30245a51aa1ac7e99e7fedf8a
Author: Jon Gjengset <[email protected]>
Date:   Wed Sep 28 18:23:39 2022 -0700

    ignore is a list

commit b783cb31ab3c6c27ad826bde44aa917c0d0908da
Author: Jon Gjengset <[email protected]>
Date:   Fri Sep 23 08:53:07 2022 -0700

    Use dependabot, but only for major versions

commit 441dc27e4d1e365bfc9b0c25e736da6cb1d15102
Author: Jon Gjengset <[email protected]>
Date:   Sun Sep 18 14:01:04 2022 -0700

    Allow examples and binaries to require features

commit ea198cc4991e2f869cd99cb8175652576ef15119
Author: Jon Gjengset <[email protected]>
Date:   Sun Sep 18 13:52:47 2022 -0700

    More concise name for scheduled jobs

commit 15c1fa2ffcc0f31fabcdcd90cde6a05b54baf8b5
Author: Jon Gjengset <[email protected]>
Date:   Sun Sep 18 12:10:58 2022 -0700

    Catch upcoming deprecations

commit 56d4398a24f8c7aae0ba4a74eefaf75d1c3db3a8
Author: Jon Gjengset <[email protected]>
Date:   Sun Sep 18 11:52:12 2022 -0700

    Merge safety workflows

commit 71c2048cc0017a84a294be69d3b1629f55b1c8f0
Author: Jon Gjengset <[email protected]>
Date:   Sun Sep 18 11:44:55 2022 -0700

    mv github .github

    This should make it possible to have rust-ci-conf as a remote you merge
    from.

commit afa25312c9c6cf8748629bd3a5c054a688785dfc
Author: Jon Gjengset <[email protected]>
Date:   Sun Sep 18 11:29:34 2022 -0700

    Practice what you preach

commit 4859c128823805015dc164d58316dc5b25a69264
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 18:16:21 2022 -0700

    Add TODOs from twitter thread

commit 87365663b1f49c88c2a3642fece0b2a932001355
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 16:19:55 2022 -0700

    Missed a submodule checkout

commit 99ddee84ab05f5d5f37ad30a31d18dd7c72050c9
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:47:57 2022 -0700

    Standardize on 'main' as branch name

commit 0f90a0b77958b3978b6be3997a09ea5cb9b1bd6b
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:47:38 2022 -0700

    Make everything use checkout@v3

commit 2de2235ad3803a978e150fca8d38182eb6ed7a9e
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:46:13 2022 -0700

    Merge another test workflow

commit 971c3fd9eb5f7d80088caaf5647a74b82d40b860
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:42:52 2022 -0700

    Merge another test workflow

commit 0910d977fc68082220d493bef07bc9d5f2265fc7
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:42:25 2022 -0700

    Merge another test workflow

commit 8953a88abecc66ea7811766b46aff6a5fd767124
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:42:10 2022 -0700

    Add first test workflow

commit 3bd8b12ec08910b2609cdfc843474d5b83ff7dbc
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:41:57 2022 -0700

    Merge another style workflow

commit fe460400ed2259af7e17f5ff51742137623e9e8e
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:41:00 2022 -0700

    Merge another style workflow

commit bc3f55118617b5ffe1ea479c4f6d7d2167b86d36
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:40:29 2022 -0700

    Add first style workflow

commit 05dd4680bf90603c70cb7cd406299675441fe59d
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:39:59 2022 -0700

    Merge another os-check workflow

commit 92379c862376607f7caca04e470c09671922f238
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:39:09 2022 -0700

    Add first os-check workflow

commit c74ee968a1aafec9e839dee907f0137e6356feff
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:38:56 2022 -0700

    Add (only) no-std workflow

commit e6ef8e3166b93c22af938872a547e104f2601587
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:38:01 2022 -0700

    Merge another msrv workflow

commit 1113c895d862ce860c82596cac973ad075ef1ac6
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:37:31 2022 -0700

    Merge another msrv workflow

commit b60aa5589ac569446a5128453983dee9bb504666
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:37:03 2022 -0700

    Merge another msrv workflow

commit 9b48ae326374d8d8609a65649026fa09f8a68c7f
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:36:43 2022 -0700

    Add first msrv workflow

commit 77079d77cb4aa288bda667917667cfaee87bd361
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:36:29 2022 -0700

    Add (only) miri workflow

commit c65a7c4f87be9ddea9e34eb254f3b6d5933db4ef
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:35:09 2022 -0700

    Add first minial workflow

commit bf66d94f15b7288f417cfae0eab6542e2e100daf
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:34:43 2022 -0700

    Add (only) LSAN workflow

commit f67cad0f915deebcdf7ceb89ffdd0925bc910153
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:34:34 2022 -0700

    Add (only) loom workflow

commit d8c8a99dea99b437eefc56e5b873a863a4446c51
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:33:48 2022 -0700

    Merge another features workflow

commit 043eb24611b5272a04082d63566837a9efbc71e9
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:32:58 2022 -0700

    Merge another features workflow

commit 922692a2977a4c93786a0ecbe11fc01501361aad
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:32:32 2022 -0700

    Merge another features workflow

commit 225ad3978688c093f4670ec04352d465076f39d3
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:31:58 2022 -0700

    Add first features workflow

commit 1fe2a6d008275efaff56200b8fba5ecc252aa970
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:31:17 2022 -0700

    Merge another coverage.yml

commit fe6ba380bd39c665e9d9a2153b2dc5287fe25cae
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:29:55 2022 -0700

    Merge another coverage.yml

commit bbdbd96ec709e3cc83a081cf821fdfffce85ecb5
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:27:38 2022 -0700

    Add first coverage workflow

commit 11027d3f75ced20536b99225edccf34f286dd4e0
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:27:27 2022 -0700

    Add (only) ASAN workflow

commit 126c9a3a35d5ac428c22883d36f0aac69d2e20e9
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:25:23 2022 -0700

    Place codecov config under .github

commit b32648cabb5862b0814ab0abd6d5c81498758270
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:24:02 2022 -0700

    Merge another codecov

commit 510b69615dd47cb63584976512cb95b265cb22bf
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:23:03 2022 -0700

    Merge another codecov

commit 7f34f791c0a5c3f2c2ce2ed7e43ff12ed123c62c
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:22:18 2022 -0700

    Merge another codecov

commit 1b8c3056e6a015949896ca20815719930ec48051
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:21:57 2022 -0700

    Merge another codecov

commit 1c486b2c73cb2ae896dd77e0f0ec060a47f15cd7
Author: Jon Gjengset <[email protected]>
Date:   Sat Sep 17 12:10:07 2022 -0700

    Add one codecov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doctests Area: rustdoc --test Command-test E-medium Experience: Medium S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Projects
Status: No status
Development

No branches or pull requests