Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

doc tests aren't being run #17

Closed
danieleades opened this issue Oct 10, 2021 · 3 comments
Closed

doc tests aren't being run #17

danieleades opened this issue Oct 10, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@danieleades
Copy link

danieleades commented Oct 10, 2021

Description

Tarpaulin action is failing to run the doc tests in the project

you can see this in the pull request here - danieleades/rtps#1

Workflow code

on:
  push:
    branches: [main]
  pull_request:

name: Code Coverage

jobs:
  coverage:
    name: coverage
    runs-on: ubuntu-latest
    steps:
      - name: checkout source
        uses: actions/checkout@v2

      - name: Install nightly toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          profile: minimal
          override: true

      - name: Run cargo-tarpaulin
        uses: actions-rs/[email protected]

      - name: Upload to codecov.io
        uses: codecov/[email protected]

Action output

Run actions-rs/[email protected]
  with:
    version: latest
    out-type: Xml
[tarpaulin] downloading cargo-tarpaulin from https://github.com/xd009642/tarpaulin/releases/download/0.18.2/cargo-tarpaulin-0.18.2-travis.tar.gz
/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/3c0f4e8f-17d8-4aa6-8eb7-29ef8d9adc47 -f /home/runner/work/_temp/07343baf-ee5e-4134-8983-64d203629497
[tarpaulin] running tests with coverage tracking
/usr/share/rust/.cargo/bin/cargo tarpaulin --out Xml
Oct 10 08:43:25.638  INFO cargo_tarpaulin::config: Creating config
Oct 10 08:43:26.072  INFO cargo_tarpaulin: Running Tarpaulin
Oct 10 08:43:26.072  INFO cargo_tarpaulin: Building project
Oct 10 08:43:26.072  INFO cargo_tarpaulin::cargo: Cleaning project
   Compiling rtps v0.1.0 (/home/runner/work/rtps/rtps)
    Finished test [unoptimized + debuginfo] target(s) in 1.28s
Oct 10 08:43:27.794  INFO cargo_tarpaulin::process_handling::linux: Launching test
Oct 10 08:43:27.794  INFO cargo_tarpaulin::process_handling: running /home/runner/work/rtps/rtps/target/debug/deps/rtps-875fbfce9ad43f4a

running 0 tests

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

Oct 10 08:43:28.105  INFO cargo_tarpaulin::report: Coverage Results:
|| Tested/Total Lines:
|| src/structure/endpoint.rs: 0/6
|| src/structure/entity.rs: 0/4
|| src/structure/group.rs: 0/4
|| src/structure/guid.rs: 0/5
|| src/structure/locator.rs: 0/2
|| src/structure/participant.rs: 0/44
|| 
0.00% coverage, 0/65 lines covered

Expected behavior

this project has doc tests which should contribute to the coverage. These tests are run by the cargo test workflow

@danieleades danieleades added the bug Something isn't working label Oct 10, 2021
@danieleades
Copy link
Author

this is probably a tarpaulin issue, rather than an issue with the action

xd009642/tarpaulin#850

@intrepion
Copy link

Have you tried adding --docs to the command?

      - name: Run cargo-tarpaulin
        uses: actions-rs/[email protected]
        with:
          args: '--docs'

@danieleades
Copy link
Author

@intrepion, yes thankyou. the issue was resolved in the linked tarpaulin issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants