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

Avoid running tests when only docs are changed #148

Closed
wants to merge 3 commits into from

Conversation

nrobinaubertin
Copy link
Collaborator

Overview

Avoid running tests when only docs are changed.

Checklist

@nrobinaubertin nrobinaubertin requested a review from a team as a code owner November 28, 2023 23:34
@nrobinaubertin nrobinaubertin marked this pull request as draft November 29, 2023 02:19
Copy link
Contributor

Test coverage for 68a812e

Name              Stmts   Miss Branch BrPart  Cover   Missing
-------------------------------------------------------------
src/charm.py        314     38     86     17    86%   129, 131, 140, 142, 150-151, 291->296, 466-467, 479-481, 486-487, 498-500, 505-506, 518-520, 525-526, 538-540, 566-568, 608->exit, 615-616, 618->exit, 624, 652-658, 684->exit, 698-699, 709->exit, 723
src/database.py      30      1      8      1    95%   56
-------------------------------------------------------------
TOTAL               344     39     94     18    87%

Static code analysis report

Run started:2023-11-29 02:21:49.588487

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 1841
  Total lines skipped (#nosec): 1
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Copy link
Contributor

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@jdkandersson jdkandersson left a comment

Choose a reason for hiding this comment

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

I'm not sure this will work since we have required checks that must pass to be able to merge?

Copy link
Collaborator

@arturo-seijas arturo-seijas left a comment

Choose a reason for hiding this comment

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

How does the publishing workflow work if there's no charm to publish? Will it skip the step or break?

@nrobinaubertin
Copy link
Collaborator Author

nrobinaubertin commented Nov 29, 2023

Responding to @jdkandersson and @arturo-seijas: I thought it would retain the status of the last CI. But it did launch it again so I put the PR into draft mode again. If I cannot confirm that:

  • it will not relaunch the CI
  • it uses the last status of the CI

I'll will not put it into ready again.

@arturo-seijas
Copy link
Collaborator

Responding to @jdkandersson and @arturo-seijas: I thought it would retain the status of the last CI. But it did launch it again so I put the PR into draft mode again. If I cannot confirm that:

  • it will not relaunch the CI
  • it uses the last status of the CI

I'll will not put it into ready again.

You'll probably need to skip charm publishing in the operator workflows if the charm file is not present. That would probably suffice. You'll still need to launch the workflow because publishing, if enabled, is done there

@nrobinaubertin
Copy link
Collaborator Author

I'm closing this as I have made no progress and the issue is complex enough that we need more discussions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants