slimndap/wp-theatre

Automated tests

Opened this issue · 1 comments

Run test after each commit. Cover as much of the plugin as possible, including any hooks that extensions rely on.

I'm unsure about the existing Travis integration, also I haven't worked with Travis yet.

But, I wanted to suggest that we could use, what I used now on more than 20 repositories. I created https://github.com/figuren-theater/code-quality to keep everything related to testing and coding-standards separate and re-usable.

This includes

  • the latest, new and fresh WordPress CS 3.0.x
  • the WordPressVIP Minimum CS
  • and the CognitiveComplexity checks as well
  • phpstan incl. the latest WordPress stubs
  • and some more

Not included is an automated test-runner after each commit, like Husky.

When refactoring older code, I almost ever start with an Establish Quality Standards issue, like this: figuren-theater/theater-production-blocks#3.

You can find an editable version at https://github.com/figuren-theater/theater-production-blocks/issues/new?assignees=&labels=automation&projects=&template=quality-standards.md&title=Establish+quality+standards

I'm a fan of not re-iventing the wheel, so I recommend using this to start with automated tests.

We can drop Travis CI. I never really knew what I was doing anyway.

Not included is an automated test-runner after each commit, like Husky.

Or can we use Github Actions?

I am fine with using your existing setup. It seems like al ot of work to set this up from scratch and we already enough on our plate.

Do the unit tests themselves still reside within the current repository?