Skip to content
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

actions: coverage #3923

Merged
merged 12 commits into from
Dec 31, 2020
Merged

actions: coverage #3923

merged 12 commits into from
Dec 31, 2020

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Nov 5, 2020

closes: #3598
follow on from: #3899

Reinstates code coverage for Cylc.

It does:

  • Capture all cylc commands.
  • Write the coverage files in your Cylc working directory.
  • Rsync coverage files back for code coverage on GH actions.
  • Plug some minor coverage holes that were quick to write tests for.

It does not:

  • Capture coverage for direct access to the cylc library from Python (i.e. not via the cylc CLI).
    • For this you can use standard tools directly (coverage, pytest --cov, etc).
  • Capture anything after the daemonisation (i.e. when --no-detach is not set).
    • Can be done in the future though there is little to gain from doing so.
  • Rsync coverage files back for code coverage locally.
    • Only does this on GH actions.

For assurance that a cylc command is being captured and covered set CYLC_COVERAGE=2, you will get a .coverage_commands_captured file which lists each command for which coverage was successfully recorded.

Initial results suggest we have ~89.5% coverage with obvious holes in the coverage around remote functionality, for now...

...Remote results in, 91.22%, not bad.

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Does not need tests (it is tests).
  • No change log entry required (invisible to users).
  • No documentation update required (documented in the code).
  • No dependency changes.

@oliver-sanders oliver-sanders added this to the cylc-8.0a3 milestone Nov 5, 2020
@oliver-sanders oliver-sanders self-assigned this Nov 5, 2020
@oliver-sanders oliver-sanders force-pushed the coverage branch 7 times, most recently from 8f4e18f to 3365413 Compare November 13, 2020 15:15
@oliver-sanders oliver-sanders marked this pull request as ready for review November 16, 2020 11:05
@oliver-sanders oliver-sanders marked this pull request as draft November 16, 2020 11:07
@oliver-sanders oliver-sanders force-pushed the coverage branch 4 times, most recently from bc9bf7c to 560353b Compare November 17, 2020 11:34
@oliver-sanders oliver-sanders force-pushed the coverage branch 13 times, most recently from fc431cb to bc1d324 Compare December 29, 2020 18:42
@oliver-sanders oliver-sanders marked this pull request as ready for review December 30, 2020 08:26
@oliver-sanders oliver-sanders requested a review from kinow December 30, 2020 08:29
@oliver-sanders
Copy link
Member Author

Deconflicted

Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/unit/main_loop/auto_restart.py → tests/unit/main_loop/test_auto_restart has lost its extension. Other suggestions optional

oliver-sanders and others added 2 commits December 30, 2020 14:06
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
else:
if version:
cmd_args.append("--version")
execute_cmd(command, *cmd_args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 great workaround !

@oliver-sanders oliver-sanders merged commit bb1ab0c into cylc:master Dec 31, 2020
@hjoliver hjoliver modified the milestones: cylc-8.0a3, cylc-8.0b0 Feb 25, 2021
@MetRonnie MetRonnie added the infrastructure GH Actions, Codecov etc. label Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure GH Actions, Codecov etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

actions: coverage
4 participants