twisted / pydoctor

This is pydoctor, an API documentation generator that works by static analysis.
https://pydoctor.readthedocs.io/
Other
179 stars 47 forks source link

[#782] Fix codecov upload #783

Closed adiroiban closed 2 months ago

adiroiban commented 2 months ago

Fixes #782

This removes the tox helper to publish the coverage.

It used the dedicated github action from Codecov. The never version of codecov uploader need an explicit token.

Also, if codecov upload fails, the job fails. In this way it should be easier to detect coverage reporting errors.

As a drive by, I have also updated some other GitHub Actions to reduce the warnings during build.

As a drive by, I have also removed some trailing spaces.


In a separate ticket/PR we can look at running the coverate report using only GItHub Actions, similar to what we have for twisted/towncrier ...but use diff_cover

https://github.com/twisted/towncrier/blob/914b446e64d62f3968a97931e490b1abe5c8c581/.github/workflows/ci.yml#L258-L267

    - name: Combine coverage & fail if it's <100%.
      run: |
        python -Im coverage combine
        python -Im coverage html --skip-covered --skip-empty

        # Report and write to summary.
        python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY

        # Report again and fail if under 100%.
        python -Im coverage report --fail-under=100
github-actions[bot] commented 2 months ago

Diff from pydoctor_primer, showing the effect of this PR on open source code:

twisted (https://github.com/twisted/twisted): typechecking got 1.07x slower (231.7s -> 246.9s)
(Performance measurements are based on a single noisy sample)
github-actions[bot] commented 2 months ago

According to pydoctor_primer, this change doesn't affect pydoctor warnings on a corpus of open source code. ✅

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.67%. Comparing base (7e0a09f) to head (ba0c62f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #783 +/- ## ========================================== + Coverage 92.65% 92.67% +0.02% ========================================== Files 47 47 Lines 8373 8373 Branches 1844 1844 ========================================== + Hits 7758 7760 +2 + Misses 354 353 -1 + Partials 261 260 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 2 months ago

According to pydoctor_primer, this change doesn't affect pydoctor warnings on a corpus of open source code. ✅

github-actions[bot] commented 2 months ago

According to pydoctor_primer, this change doesn't affect pydoctor warnings on a corpus of open source code. ✅

adiroiban commented 2 months ago

please review