mirror of
https://github.com/actix/actix-web.git
synced 2024-11-22 09:31:10 +00:00
test: coverage for doctests
This commit is contained in:
parent
7a2313cc4b
commit
d9579cf58a
2 changed files with 13 additions and 7 deletions
2
.github/workflows/coverage.yml
vendored
2
.github/workflows/coverage.yml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
||||||
tool: just,cargo-llvm-cov
|
tool: just,cargo-llvm-cov
|
||||||
|
|
||||||
- name: Generate code coverage
|
- name: Generate code coverage
|
||||||
run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json
|
run: just test-coverage-codecov
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v4.4.1
|
uses: codecov/codecov-action@v4.4.1
|
||||||
|
|
18
justfile
18
justfile
|
@ -53,13 +53,19 @@ test-docs toolchain="": && doc
|
||||||
# Test workspace.
|
# Test workspace.
|
||||||
test-all toolchain="": (test toolchain) (test-docs toolchain)
|
test-all toolchain="": (test toolchain) (test-docs toolchain)
|
||||||
|
|
||||||
# Test workspace and generate Codecov coverage file.
|
# Test workspace and collect coverage info.
|
||||||
test-coverage-codecov toolchain="":
|
[private]
|
||||||
cargo {{ toolchain }} llvm-cov --workspace {{ all_crate_features }} --codecov --output-path codecov.json
|
test-coverage toolchain="":
|
||||||
|
cargo {{ toolchain }} llvm-cov nextest --no-report {{ all_crate_features }}
|
||||||
|
cargo {{ toolchain }} llvm-cov --doc --no-report {{ all_crate_features }}
|
||||||
|
|
||||||
# Test workspace and generate LCOV coverage file.
|
# Test workspace and generate Codecov report.
|
||||||
test-coverage-lcov toolchain="":
|
test-coverage-codecov toolchain="": (test-coverage toolchain)
|
||||||
cargo {{ toolchain }} llvm-cov --workspace {{ all_crate_features }} --lcov --output-path lcov.info
|
cargo {{ toolchain }} llvm-cov report --doctests --codecov --output-path=codecov.json
|
||||||
|
|
||||||
|
# Test workspace and generate LCOV report.
|
||||||
|
test-coverage-lcov toolchain="": (test-coverage toolchain)
|
||||||
|
cargo {{ toolchain }} llvm-cov report --doctests --lcov --output-path=lcov.info
|
||||||
|
|
||||||
# Document crates in workspace.
|
# Document crates in workspace.
|
||||||
doc *args:
|
doc *args:
|
||||||
|
|
Loading…
Reference in a new issue