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 integration and validation tools: TravisCI + CodeClimate & Some refactor fixes #15

Merged
merged 9 commits into from Jun 19, 2017

Conversation

JoryHogeveen
Copy link
Collaborator

@JoryHogeveen JoryHogeveen commented Apr 29, 2017

Me again!

I noticed this plugin isn't using any CI tools yet so could be a good way to check everything with different versions etc. before deploying on the WP repository.
This PR will add all the required files to integrate with TravisCI and CodeClimate (both free tools for open source projects). You just need to create an acount on both with your GitHub login and enable it for this repository once the PR is merged.

I've also put some minor fixes in there (see "Other changes"). Left all logic as it is (mostly added some changes like strict comparison and yoda notation).

Checks done with TravisCI:

  • PHP 7.1 -> Latest WP verson, both single and multisite
  • PHP 7.0 -> Latest WP verson, both single and multisite
  • PHP 5.6 + Latest WP verson (single installation)
  • PHP hhvm + WP 3.8 (single installation)
  • PHP 5.3 + WP 3.8 (single installation)

Allowed failures:

  • PHP 5.2 + Latest WP verson (single installation)
  • PHP 5.2 + WP 3.8 (single installation)
  • PHP hhvm + WP 3.8 (single installation)

Checks done with CodeClimate

I haven't customized this yet.

PHP Mess Detector

  • Design (all checks)
  • CleanCode (all checks)
  • CodeSize (all checks)
  • Naming (all checks)

PHP Code Sniffer

Other changes:

  • Strict comparison
  • Yoda notation
  • Concat operator spacing
  • Indentations
  • Added README.md with CI and WP badges for GitHub.
  • Added me as a contributor

TODO:

  • Create some PHP Unit Tests. Any ideas?
  • Fix other CodeClimate issues that come up (probably a second PR since the first scan will need to be triggered from the plugin master branch).
    • Some checks (like Nonces) could probably be disabled/ignored in this case.

@JoryHogeveen JoryHogeveen changed the title Integrate ci Add integration and validation tools: TravisCI + CodeClimate & Some refactor fixes Apr 29, 2017
@cleverness
Copy link
Owner

Wow, this is great. I haven't had any time to put into this plugin. I don't have any thoughts on unit tests for it, other than I like the idea.

I will check this over in the next few days, hopefully.

@JoryHogeveen
Copy link
Collaborator Author

Hi Cindy, no problem about the ideas, I have some allthough it does need some refactoring.
Please review the current state and I'll propose some tests a.s.a.p.

@JoryHogeveen
Copy link
Collaborator Author

Hi Cindy, did you manage to check the PR? Let me know!

@cleverness
Copy link
Owner

I have just been swamped with client work and family life the past two months so I've had no time to look at it. I've added you to this repo and to the wp.org repository as a contributor (I think that should give you SVN access). I hate seeing this plugin too stagnant seeing as there's now over 100,000 users.

I'll merge this PR and set up those two accounts and enable them on the repo. Go ahead and push any updates to the wp.org repo if you can access it, if they're all working.

Many thanks for your contributions to this plugin.

@cleverness cleverness merged commit 0842fdb into cleverness:master Jun 19, 2017
@JoryHogeveen
Copy link
Collaborator Author

Hi Cindy,

No problem at all, and thanks for adding me!
Let me know when Travis and CodeClimate are enabled so I can take a look.

And I will definitely add any enhancements when I have the time. #16 is one I'd like to pick up a.s.a.p.
I didn't get any notice from the WP repo yet but maybe that could take some time.

Thanks!

@cleverness
Copy link
Owner

cleverness commented Jun 19, 2017 via email

@JoryHogeveen
Copy link
Collaborator Author

JoryHogeveen commented Jun 19, 2017

Yep it works, TravisCI tests now running and passing. I will push codeclimate fixes to this branch and make a new PR when ready.

@JoryHogeveen JoryHogeveen mentioned this pull request Jun 20, 2017
20 tasks
@JoryHogeveen JoryHogeveen self-assigned this Jun 27, 2017
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.

None yet

2 participants