- Issue created by @dydave
- Merge request !14Issue #3413198 by DYdave: Automated testing on GitLab CI: Added initial... → (Merged) created by dydave
- last update
over 1 year ago 1 pass - last update
over 1 year ago 1 pass - last update
over 1 year ago 1 pass - Status changed to Needs review
over 1 year ago 1:31am 9 January 2024 - 🇫🇷France dydave
Quick follow-up on this ticket:
As suggested in the Issue summary, added at #2 initial configuration file
.gitlab-ci.yml
based on template and documentation from Documentation on Drupal.org: GitLab CI → , to provide automated testing with GitLab CI pipelines.After seeing the first pipeline being run automatically at:
https://git.drupalcode.org/issue/simple_block-3413198/-/pipelines/73584Multiple issues appeared which were fixed in a following commit:
- Fixed
eslint
andphpcs
coding standards errors. - Fixed
phpstan
issues by- declaring constructors
final
(see 📌 GitLab CI - PHPStan - "Unsafe usage of new static()" Fixed and 📌 GitLab CI - PHPStan - "Unsafe usage of new static()" Fixed for more information) - and adding dependency injection to the
token
service in classSimpleBlockBlock
.
- declaring constructors
- Fixed
phpunit
errors by- replacing the
classy
theme withclaro
which is now the core admin theme for D10 - and adding permission to
create page content
to be able to test a node (simple_block_layout_builder
).
- replacing the
After the second commit, the merge request passed all tests and came back green ✅:
https://git.drupalcode.org/issue/simple_block-3413198/-/pipelines/73915/
We would greatly appreciate if you could please try testing/reviewing the changes in the merge request (!MR14) and more particularly give us your feedback.
Feel free to let us know at any point if you have any questions, concerns, comments or suggestions on any of the changes from the MR or this ticket in general, we would surely be very happy to help.
Thanks in advance for your feedback and reviews! - Fixed
- last update
over 1 year ago 1 pass - 🇫🇷France dydave
Quick follow-up on this issue with the recent commits to the module and release of simpleblock-1.5 release → , quite a few PHPCS/PHPSTAN issues from the version of !MR14 at #3 were fixed, so the changes had to be rerolled, with a few conflicts to fix.
I've edited the description of the MR to reflect the changes, see:
https://git.drupalcode.org/project/simple_block/-/merge_requests/14The tests still seem to pass - all green ✅ :
https://git.drupalcode.org/issue/simple_block-3413198/-/pipelines/82909At this point, the MR is ready to be merged "as-is" and would probably allow testing quite a few pending merge requests or patches in module's issue queue, straight on GitLab CI.
We would greatly appreciate if a maintainer of the module, perhaps Viktor (@AstonVictor), could take a look at the changes in this ticket and give us some feedback.
Feel free to let us know if you have any comments, questions or concerns on any changes suggested in this ticket, the merge request, or this module in general, we would surely be glad to help.
Thanks in advance ! - First commit to issue fork.
- last update
over 1 year ago 1 pass - last update
over 1 year ago 1 pass - last update
over 1 year ago 1 pass - Status changed to Fixed
over 1 year ago 1:09pm 29 January 2024 - 🇺🇦Ukraine AstonVictor
Hi @DYdave,
thanks for the MR. Updated it and merged in
8.x-1.x
branch.> declaring constructors final
no need to add final class. we don't use it in the core. we can avoid it by addingphpstan.neon
file.> and adding permission to create page content to be able to test a node
we can simply create an admin user and skip a list of permissions. -
AstonVictor →
committed fd28cbcf on 8.x-1.x
Issue #3413198 - Add admin user
-
AstonVictor →
committed fd28cbcf on 8.x-1.x
-
AstonVictor →
committed fedc17c8 on 8.x-1.x
Issue #3413198 - Change comment
-
AstonVictor →
committed fedc17c8 on 8.x-1.x
-
AstonVictor →
committed 835678d1 on 8.x-1.x
Issue #3413198 - Add phpstan.neon file
-
AstonVictor →
committed 835678d1 on 8.x-1.x
- 🇺🇦Ukraine AstonVictor
AstonVictor → changed the visibility of the branch 8.x-1.x to hidden.
- 🇫🇷France dydave
Thanks a lot Viktor (@AstonVictor) for your prompt and positive follow-up on this issue.
For documentation sake, just noting here :
#9 : In the end you've decided to ignore the PHPStan error "Unsafe usage of new static()" and go with the approach recommended on Drupal.org : Handling "Unsafe usage of new static()", paragraph "Ignoring the issue" → .
As opposed to the approach selected in 📌 GitLab CI - PHPStan - "Unsafe usage of new static()" Fixed and detailed in the Documentation for the Smart Trim module: Extending Smart Trim → .#7 : Automated Tests : You've decided to remove all permissions for a regular user and just test with a super admin account.
All these changes are perfectly fine and you're the maintainer now, so you probably know what's best for the maintenance of the module.
Lastly : At this point, all the tests seem to pass on the
8.x-1.x
branch ✅ :
https://git.drupalcode.org/project/simple_block/-/pipelines/84219Feel free to let us know at any point if you have any questions, comments or concerns on any of the recent changes to the module, this ticket, or the project in general, we would certainly be happy to help.
Thanks again very much Viktor (@AstonVictor) for your great reactivity and help fixing these issues.
Cheers ! - Status changed to Fixed
about 1 year ago 1:20pm 9 February 2024