-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add multisite test coverage when SUBDOMAIN_INSTALL is true #5522
base: trunk
Are you sure you want to change the base?
Conversation
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
@desrosj Super low priority, I'm just poking to see if I can get this to work. 😄 Is there a best practice for modifying
Or can I tweak that and then revert to test this PR? |
Unfortunately, no. I usually just change it to point to the version in my fork in the PR's branch. Just have to remember to change it back when committing to |
@@ -161,6 +161,10 @@ jobs: | |||
if: ${{ inputs.multisite }} | |||
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ms-files | |||
|
|||
- name: Run tests as a subdomain multisite install | |||
if: ${{ inputs.multisite }} | |||
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} -d SUBDOMAIN_INSTALL=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to run this in parallel to avoid multisite jobs from taking double the amount of time. The best way to do this would likely be to add a new input for multisite-type
that defaults to subdirectory
and change this condition to something like:
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} -d SUBDOMAIN_INSTALL=true | |
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }}${{ 'subdomain' == inputs.multisite-type && ' -d SUBDOMAIN_INSTALL=true' || '' }} |
Probably should make the ms-files
job dynamic as well.
Working this into the matrix in phpunit-tests.yml
is a little tricky,. We should be able to add a multisite-type: [ 'subdomain', 'subdirectory' ]
accompanied with an exclude:
excluding all multisite: false/multisite-type: 'subdomain
and multisite: false/multisite-type: 'subdirectory
jobs.
Trac ticket: https://core.trac.wordpress.org/ticket/42093
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.