-
Notifications
You must be signed in to change notification settings - Fork 7
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
CI: switch to ghactions #23
CI: switch to ghactions #23
Conversation
As this is a PHP project and the build steps are relatively simple, it will make it more intuitive for contributors to use Composer scripts to run CI checks, than to have to install Ant for this. This commit creates the same build/CI scripts as were previously available via Ant in the Composer configuration file. Notes: - The scripts are set up to respect the PHP version used by Composer (instead of a system default). - The scripts are set up to work equally well on Linux/Windows/Mac. - The only two differences are: - The `mkdir` and file deletions won't automatically be done anymore. Generally speaking, the `mkdir` should only need to be run once anyway and the file deletes should not be necessary as the log files will just be overwritten by the tools, so I deemed this an acceptable trade-off. - The `colors` argument won't be set anymore. For most tools, this means, the tool will default to automatically determining whether the CLI used supports colourized output. As the determination of this in most tools has become pretty good, I, again, deemed this an acceptable trade-off.
This commit: * Adds a GH Actions `cs` workflow for the code style and vardump checks which were previously run on Travis. These checks only need to run against one PHP version as the results will be the same independently of the PHP version these checks are run on. * Adds a GH Actions `test` workflow for the linting and unit test checks which were previously run on Travis. * Uses the [`cs2pr`](https://github.com/staabm/annotate-pull-request-from-checkstyle) tool to display the results of the PHP linting and the results of the PHP code style check in-line in the file diff in the PR. * Removes the, now redundant, `.travis.yml` configuration. * Updates the `.gitattributes` file. * Updates the "Build Status" badge in the Readme to use the results from the GH Actions runs.
@grogy Could you give the Okay for the GH actions to run on this PR ? That way you can see them in action. GH made a change recently for security reasons that PRs running actions need to be approved the first time the action is run for a new contributor: https://github.blog/changelog/2021-04-22-github-actions-maintainers-must-approve-first-time-contributor-workflow-runs/ |
In GUI i don't see approve button. The PR looks ok - the idea is good and mistakes in implementations we can resolve in next commit. For it - I merge it ;) Thank you |
You code as a queen! Works great for the first time 🚀 |
@grogy Glad to hear it, though the actions did run in my own fork, so I'd already tested them and made sure everything was okay. Either way, two down, one more to go - did you see my PR in the Console Color repo ? Once that one is merged, I can pull a similar PR to this there too. |
Composer/Ant: move the build scripts to the Composer configuration
As this is a PHP project and the build steps are relatively simple, it will make it more intuitive for contributors to use Composer scripts to run CI checks, than to have to install Ant for this.
This commit creates the same build/CI scripts as were previously available via Ant in the Composer configuration file.
Notes:
mkdir
and file deletions won't automatically be done anymore.Generally speaking, the
mkdir
should only need to be run once anyway and the file deletes should not be necessary as the log files will just be overwritten by the tools, so I deemed this an acceptable trade-off.colors
argument won't be set anymore.For most tools, this means, the tool will default to automatically determining whether the CLI used supports colourized output.
As the determination of this in most tools has become pretty good, I, again, deemed this an acceptable trade-off.
CI: switch to GitHub Actions
This commit:
cs
workflow for the code style and vardump checks which were previously run on Travis.These checks only need to run against one PHP version as the results will be the same independently of the PHP version these checks are run on.
test
workflow for the linting and unit test checks which were previously run on Travis.cs2pr
tool to display the results of the PHP linting and the results of the PHP code style check in-line in the file diff in the PR..travis.yml
configuration..gitattributes
file.Fixes #13
Fixes #22