resque / php-resque

An implementation of Resque in PHP.
MIT License
216 stars 77 forks source link

Move CI to GitHub actions #49

Closed SMillerDev closed 3 years ago

SMillerDev commented 3 years ago

Since Travis isn't great for Open-Source anymore this moves the tests to GitHub Actions.

In addition it also complains about a codestyle (PSR-12 for now) and lets PHPStan have a go. If codecoverage reporting is wanted I can set up a provider of your choice.

mfn commented 3 years ago

Noice 👍 , I support the move to GHA.

However, I don't see much reason to run non-phpunit stuff in the matrix; phpcs/phpstan are unrelated to that and should only be run once and probably should just have their own workflow.

SMillerDev commented 3 years ago

Works for me, I figured phpstan might depend on the actual php version but I'm happy to change it.

As for phpcs, what is the official codestyle?

danhunsaker commented 3 years ago

The official code style is severely outdated. I'd like to switch to PSR-12 with tabs instead of space-indentation, but that's a whole refactor.

SMillerDev commented 3 years ago

I can see how far phpcbf gets me to PSR12. But I'm not sure how to edit that style for tabs.

danhunsaker commented 3 years ago

Try that config. 😃

mfn commented 3 years ago

I figured phpstan might depend on the actual php version but I'm happy to change it.

I think this is indeed correct but, from my experience, problematic to support because you might have different errors reported depending on the runtime, and this could then require PHP-version dependent ignoreErrors configuration.

I usually settle just for the highest stable PHP version support for phpstan

SMillerDev commented 3 years ago

Last CI run: https://github.com/SMillerDev/php-resque/actions/runs/974753889

I think this is a good start. It complains about codestyle without failing the build. I would prefer to merge this as is and make two new PRs to follow up. One to fix the code style and one to split up the CI checks.

danhunsaker commented 3 years ago

Merged! Two requests, though. First, please use a branch on your fork that isn't master for future PRs (we squash merge, so now our masters diverge). And second, let's do the change to the workflow first, then apply the formatting. The latter will take quite some time to review.