Skip to content

Commit

Permalink
Actually run doctests in CI test-fast jobs
Browse files Browse the repository at this point in the history
The `test-fast` job has been intended to run doctests since 89a0567
(GitoxideLabs#1556). But because there are no doctests in the top-level project
and neither `--workspace` nor its `--all` alias were passed, the
effect has been:

	Compiling ...
	Finished `test` profile [unoptimized + debuginfo] target(s) in 28.55s
       Doc-tests gitoxide

    running 0 tests

    test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

(Where ... stands for details in various "Compiling lines. That
output is copied from

    https://github.com/GitoxideLabs/gitoxide/actions/runs/11690609999/job/32555922512#step:9:70

though that log will eventually become unavailable, and only the
build time changes.)

Note that zero tests are run and the status reports zero of each
possible kind of result. There are (at least currently) no doctests
in the top-level package, and `--workspace` is not implied.

This adds `--workspace` to the command that runs the doctests, so
it will collect and run doctests throughout the entire workspace.

For now, this is not done on the corresponding command in the
`unit-tests` rule in `justfile`; it may make sense to do that, but
if it is done, then this step should probably be omitted on the
`ubuntu-latest` run of `test-fast` since the CI job that runs
`just unit-tests` is `test` which itself runs on `ubuntu-latest`.

(The changes in GitoxideLabs#1556 were revised in GitoxideLabs#1559, but that only fixed a
problem with reporting results from non-doctest tests. I had not
noticed the problem of not running any doctests at that time.)
  • Loading branch information
EliahKagan committed Nov 6, 2024
1 parent 14d472d commit ebc3495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
GIX_TEST_CREATE_ARCHIVES_EVEN_ON_CI: 1
run: cargo nextest run --workspace --no-fail-fast
- name: Doctest
run: cargo test --doc
run: cargo test --workspace --doc
- name: Check that tracked archives are up to date
run: git diff --exit-code # If this fails, the fix is usually to commit a regenerated archive.

Expand Down

0 comments on commit ebc3495

Please sign in to comment.