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 badges to plugins repositories #6560

Closed
mnapoli opened this issue Oct 30, 2014 · 8 comments
Closed

Add badges to plugins repositories #6560

mnapoli opened this issue Oct 30, 2014 · 8 comments
Assignees
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mnapoli
Copy link
Contributor

mnapoli commented Oct 30, 2014

From #6544: Add code coverage badge + Travis CI badge + Code quality badge in each plugin README (core+PRO plugins)

@mnapoli mnapoli added Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. labels Oct 30, 2014
@mnapoli mnapoli self-assigned this Oct 30, 2014
@mnapoli mnapoli added this to the Piwik 2.10.0 milestone Oct 30, 2014
@mnapoli
Copy link
Contributor Author

mnapoli commented Nov 4, 2014

@mattab

I'm having a lot of trouble with the current .travis.yml and its generator. Furthermore I don't think Scrutinizer is a good idea after all for plugins (i.e. what we started discussing last time):

  • plugins don't have unit tests, at best a few of them have have integration tests but those are not in code coverage, per Move code coverage from Travis to Scrutinizer #6556
  • Scrutinizer analyzer can't do much because plugins don't use Composer, so all calls to Piwik core can't be analyzed. That also means that detecting calls to @deprecated can't be done that way.

So Scrutinizer don't provide much value in this case. If we were to set it up today on all plugins, all code coverages will be 0% (either because there are no unit tests or because there are no tests/passing tests). And all quality indicators will be very high, i.e. not useful.

So I'm suggesting we keep Scrutinizer for Piwik Core and components (as it is now). And for plugins we don't use Scrutinizer (at least until the situation improves). There is currently coveralls configuration but it seems that it's not even used! So I'd say let's drop the idea of code coverage because it doesn't work and it's useless right now.

Regarding #6544 I'd say let's start by having tests and making them pass. And let's try to have more unit tests too and clearly separate them from integration/system/ui tests (like it is in Core). Writing unit tests today is not simple, but hopefully it will become easier on the long run with DI.

@sgiehl
Copy link
Member

sgiehl commented Nov 4, 2014

There are some Plugins running code coverage using coveralls. See
http://coveralls.io/r/piwik

@mnapoli
Copy link
Contributor Author

mnapoli commented Nov 4, 2014

OK then something's wrong, I couldn't make it work. At first glance it seems that coveralls has no report in the last 14 days (https://coveralls.io/r/piwik/plugin-LoginLdap) but there are commits since then.

@mattab
Copy link
Member

mattab commented Nov 4, 2014

Let's not drop code coverage. it's very useful and needed because we try to establish an engineering culture of Core plugins and PRO plugins bundled with tests. I see code coverage as a rough imperfect-yet-useful indicator of the quality of tests.

Because we need to have tests for all plugins we should maintain, and because we don't know how good tests are without investigating them in detail, then code coverage metric has a real value for a quick assessment when reviewing new plugin.

mnapoli added a commit to matomo-org/plugin-TasksTimetable that referenced this issue Nov 5, 2014
mnapoli added a commit to matomo-org/plugin-TreemapVisualization that referenced this issue Nov 5, 2014
@mnapoli
Copy link
Contributor Author

mnapoli commented Nov 5, 2014

I've added the Travis badges everywhere at least. Let's keep Coveralls then.

@sgiehl
Copy link
Member

sgiehl commented Nov 5, 2014

Code coverage did not work because of an error in the .travis.yml template. I've fixed it. Seems to work again for LoginLdap plugin

@mattab
Copy link
Member

mattab commented Nov 28, 2014

Sitaution: we have code coverage with Scrutinizer on Core piwik but not on plugins. For now we don't need code coverage on plugins as it's quite useless metrics because we have too few unit tests.

@mattab mattab closed this as completed Nov 28, 2014
@mattab
Copy link
Member

mattab commented Jan 6, 2015

followed up in #6931 Generate Unit tests code coverage report for Plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

3 participants