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

Add deepsource code coverage #5717

Merged
merged 7 commits into from
Oct 29, 2023

Conversation

matmair
Copy link
Contributor

@matmair matmair commented Oct 17, 2023

This PR is a follow-up tp #5714 and adds code coverage reporting to deepsource (the coverage used for coveralls is reused)

@matmair matmair added the CI CI / unit testing ecosystem label Oct 17, 2023
@matmair matmair added this to the 0.13.0 milestone Oct 17, 2023
@matmair matmair self-assigned this Oct 17, 2023
@netlify
Copy link

netlify bot commented Oct 17, 2023

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit e4977f2
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/65314de5b38ce100081918e4

@matmair
Copy link
Contributor Author

matmair commented Oct 17, 2023

The function of this depends on a secret being set, that was transferred on another medium

@matmair
Copy link
Contributor Author

matmair commented Oct 17, 2023

@SchrodingersGat this would be ready for merge

@wolflu05
Copy link
Contributor

What is the improvement? Does this mean we can drop coveralls?

@matmair
Copy link
Contributor Author

matmair commented Oct 17, 2023

We have a full view of missing coverage in the SAST solution. I would not drop coveralls, we have years of history there.

@wolflu05
Copy link
Contributor

Makes sense.

@matmair matmair closed this Oct 17, 2023
@matmair matmair reopened this Oct 17, 2023
@wolflu05
Copy link
Contributor

You can also commit without changing something with the --allow-empty argument

@matmair
Copy link
Contributor Author

matmair commented Oct 19, 2023

Yes but that wouldn't trigger a server CI run.

@SchrodingersGat
Copy link
Member

Not sure why this failed - DEEPSOURCE_DSN is set

@wolflu05
Copy link
Contributor

wolflu05 commented Oct 19, 2023

Secrets are not used for pull_request triggers from forks for security reasons. Otherwise anyone could just read out every secret by sending them to their servers via curl when modifying the workflow. @matmair needs to set this secret in his repo and run the actions on his repo.

@SchrodingersGat
Copy link
Member

Secrets are not used for pull_request triggers from forks for security reasons. Otherwise anyone could just read out every secret by sending them to their servers via curl when modifying the workflow. @matmair needs to set this secret in his repo and run the actions on his repo.

Ah, of course!

@wolflu05
Copy link
Contributor

But if the action relies on this secret, I guess we need to search for a different approach? How does the coveralls auth works?

@SchrodingersGat
Copy link
Member

I think coveralls relies on a github integration which you can authorize - rather than a repo secret

@matmair
Copy link
Contributor Author

matmair commented Oct 19, 2023

I have added the DSN to my repo and it worked in my out-of-tree repos but I will just disable it on PRs

@wolflu05
Copy link
Contributor

But where is the improvement then, if this can only upload the test results on a merge but not while the pr is going on?

@matmair
Copy link
Contributor Author

matmair commented Oct 19, 2023

I think we have a differing understanding of the goal here: Mine is to add code coverage indicators to the SAST tool. This is not meant as a replacement for coveralls.

@wolflu05
Copy link
Contributor

Oh ok, makes sense now.

@matmair matmair closed this Oct 19, 2023
@matmair matmair reopened this Oct 19, 2023
@SchrodingersGat
Copy link
Member

@matmair is this OK to merge in now, or needs further work?

@matmair
Copy link
Contributor Author

matmair commented Oct 29, 2023

@SchrodingersGat this is ok to merge

@SchrodingersGat SchrodingersGat merged commit 7ff3f99 into inventree:master Oct 29, 2023
39 of 40 checks passed
@matmair matmair deleted the deepsource-coverage branch October 29, 2023 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI CI / unit testing ecosystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants