- Issue created by @ressa
- First commit to issue fork.
- Status changed to Needs review
6 months ago 8:22pm 19 June 2024 - 🇧🇷Brazil hmendes
Created a config page for both messages.
I saw that there are a couple files related to phpunit and docker, honestly, idk if they're being used.. if my first time using this module and I've also being away from the community for a few months, so idk if smth changed and now those files are required...Anyway, let me know if there smth else that should be changed, or if the code I changed impacted smth else bc of those extra configurations.
- Status changed to Needs work
6 months ago 1:25pm 20 June 2024 - 🇨🇦Canada alberto56
Hi @hmendes
files related to phpunit and docker
Although this is not something that's standard in Drupal projects, I use those as part of automated testing, here is how it works: on the github mirror of this project at https://github.com/dcycle/uli_custom_workflow, you will see a green badge that says "Passed", this means CircleCi tests are passing at https://app.circleci.com/pipelines/github/dcycle/uli_custom_workflow?bra...
In turn CircleCI tests are defined at https://github.com/dcycle/uli_custom_workflow/blob/1.x/.circleci/config.yml which basically says tests require Docker to be run and can be run using ./scripts/ci.sh
To run all tests locally without any other dependency, if you have Docker installed, you can run ./scripts/ci.sh on your machine, which uses Docker to run all tests including PHPUnit tests.
Need to merge 1.x into your MR branch and fix tests
The branch as it is, is based on version of 1.x which is not completely up-to-date. There are some changes to 1.x branch, including a change I just made a few minutes ago, which should be merged into the MR branch 3367414/3367414-move-configuration-to.
Once that is done, you can run tests locally by installing Docker and running ./scripts/ci.sh
This will yield some errors such as:
FILE: /code/src/Form/UliCustomWorkflowSettingsForm.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Form\ConfigFormBase. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: /code/src/Controller/UliUserController.php ---------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------- 5 | WARNING | [x] Unused use statement ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------
Once ./scripts/ci.sh works locally, I will be able to review and test the code.
- 🇧🇷Brazil hmendes
Oh, ok, got it, thanks.
I fixed the issues related to phpcs/lint and phpunit, but I couldn't run the 'deploy' and 'test-running-environment.sh' scripts due to some issues in my local env, but I won't have time to fix it now, so if anyone wants to check it out, feel free to do so.