-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
use git submodules for bats-* instead of globally installed brew packages #36
Comments
I haven't ever seen anything but pain from git submodules, but have been avoiding them for a long time. If this would mean adding these as submodules of the project under test, I really really wouldn't like it. |
That exactly what this means. I am not a fan of git submodules either, and also avoid it at all costs, but this being just for tests, I figured it wasn't too bad. I can also maybe rely on |
I like the fact that this can be locally and would make this action pretty independent. |
this works with
|
I can add that to AND.. I still think we should add |
Although I think this makes it harder to document and onboard others for running tests locally |
Just saw |
See https://github.com/ddev/ddev-drupal-contrib/actions/runs/11296006345/job/31419956642?pr=85 This exemplifies the potential issues:
|
This is super easy:
|
what if someone didn't setup bats with homebrew? I guess unlikely |
You'll know more than me how unlikely that can be, thoughts? |
It's not unlikely for local. It's easy on macOS, easy on Linux amd64. Impossible on Linux arm64. But the other instructions are still there in https://github.com/ztombol/bats-docs?tab=readme-ov-file#installation Maybe npm is the best way? I've always been hoping to become more of an expert and more of a fan of bats and these assert libraries, but they still frustrate me also. |
I still believe for this particular use case, gitsubmodules is the way to go, I will give it a try and see if the maintainer likes it and let you test drive it. |
I don't like having to relay for npm just for running tests |
This worked though: ddev/ddev-drupal-contrib@b2ba34c |
Just for running bash tests |
Well, I actually do like git submodules for this: https://github.com/ddev/ddev-drupal-contrib/pull/85/checks (not using your homebrew installation at all, even bats-core is a ddev/ddev-drupal-contrib@ee13990 Instructions for running tests locally anywhere are:
Uses bats-assert |
This looks good when used for just one repo, but not for many, it increases the maintenance burden, and you need to update them periodically to new commits, which is not needed now. BTW, submodules can be initialized with one command |
Not sure I understood this, and it's the same as updating any other dependency through any other means (composer, npm, etc..)
Thanks! Will update, I don't need the the recursive part. |
Hi @hanoii, I saw that you had found it but, reading this:
this is exactly why the I hope that's enough to solve your issue. Thanks |
@julienloizelet yes, I saw it looking at the code, and yes, I am using it and works as expected! |
Thanks @hanoii, I’m closing this issue. Happy to continue the conversation here or elsewhere. |
In working on ddev/ddev-drupal-contrib#85 I wanted to use bats-support and bats-assert.
I started wondering how to use them.
I am on mac and with
brew info kaos/shell/bats-assert
I get
Ok there. Because this action uses homebrew for linux as well, I'd assume this might work, however, it is still a bit dependent on the system, and a bit cryptic, so I was thinking on a potentially better alternative:
Use git submodules: https://bats-core.readthedocs.io/en/stable/tutorial.html#quick-installation
I am not 100% sure of the implications, but I think very little, from what I gather:
git submodules init
submodules: true
to the checkout action.gitmodules
Thoughts?
The text was updated successfully, but these errors were encountered: