PHPCompatibility / PHPCompatibilityWP

PHPCompatibility ruleset for WordPress projects
GNU Lesser General Public License v3.0
179 stars 11 forks source link

CI: switch to GitHub Actions #24

Closed jrfnl closed 3 years ago

jrfnl commented 3 years ago

This commit:

Notes:

  1. Builds will run on pushes to master and on pull requests. For a small repo like this, running on all pushes seems redundant.
  2. The build will automatically be triggered once a month (was previously also done on Travis) to make sure that upstream changes to the polyfills themselves will not go unnoticed if they impact the ruleset.
  3. If the XMLLint "stage" fails, the test stage will be skipped. Reasoning: if there is a syntax error in the XML, the tests will fail anyhow.
  4. The build against PHPCompatibility dev-develop should be allowed to fail, which is why is it marked as experimental and why continue-on-error checks that value. When updating the "required statuses", that particular build should not get a checkmark. That way, all builds will run, but a failure of the build on the dev-develop branch will not block merging of PRs.
jrfnl commented 3 years ago

Potentially worth looking at the testVersion of 5.2-

Yes, was thinking about that myself as well when working on this.

As plugins and themes often support a wide range of WP versions, 5.2- still seems appropriate.

All the same, I can imagine, we change it to 5.6- in the next major release (which will coincide with the release of PHPCompatibility 10.0.0). What do you think ?

For now, for this PR, the aim was to swop out the CI scripts one-on-one though.

the min PHP test version of 5.4 as this seems inconsistent (also to WP's min of 5.6)

Actually, no, the PHP versions used to test are based on what PHP_CodeSniffer supports, not WP, so those are correct and should remain as they are (high/low PHP 8.0/5.4) until such time as that PHPCompatibility drops support for PHP_CodeSniffer 3.x.

Does that make sense ?

GaryJones commented 3 years ago

All good. Happy to keep this PR as is, and leave any other change to a different issue.