Skip to content
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

require-dev and --no-dev #297

Open
finnlewis opened this issue Oct 9, 2023 · 4 comments
Open

require-dev and --no-dev #297

finnlewis opened this issue Oct 9, 2023 · 4 comments
Assignees

Comments

@finnlewis
Copy link
Member

Discussing in Merge Monday.

See #295

For full tests to run we need group module which is now require-dev in localgov_alert_banner

So for now the tests are failing on localgov_project localgovdrupal/localgov_project#131

So we need to include group module when running all the tests across the project.

Options:

  1. Amend our test.yml to install the dependencies (possibly with composer install localgovdrupal/localgov_alert_banner)
  2. Add requirements to the root composer.json in the project
@finnlewis
Copy link
Member Author

Discussing in Tech Governance Meeting.

@ekes suggests that there is a third way.

We can test the localgov_alert_banner tests to skip if the dependency (group) is missing.

So we would want to amend the tests here:

https://github.com/localgovdrupal/localgov_alert_banner/blob/1.x/modules/group_alert_banner/tests/src/Kernel/GroupAlertBannerTest.php

@ekes will tell us how to do this!

@finnlewis finnlewis transferred this issue from localgovdrupal/localgov_project Oct 11, 2023
@finnlewis
Copy link
Member Author

@andybroomfield I'm just trying this on a branch and will send you a pull request.

@millnut
Copy link
Member

millnut commented Oct 12, 2023

Like this:

https://git.drupalcode.org/project/search_api/-/blob/8.x-1.x/modules/search_api_db/tests/src/Kernel/AutocompleteTest.php?ref_type=heads#L14

I think that is a really good approach to skip the test if the dependency is not present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants