Skip to content

Add missing clean-up in templates/install-wp-tests.sh - #283

Merged
schlessera merged 4 commits into
wp-cli:fix/gha-functional-tests-updatefrom
Lewiscowles1986:pr-to-fix-gha-wip
Mar 25, 2021
Merged

schlessera merged 4 commits into
wp-cli:fix/gha-functional-tests-updatefrom
Lewiscowles1986:pr-to-fix-gha-wip

Conversation

@Lewiscowles1986

@Lewiscowles1986 Lewiscowles1986 commented Mar 11, 2021 •

Copy link
Copy Markdown
Contributor

@schlessera this should fix the branch you posted in WordPress Slack, pending merge of wp-cli/wp-cli-tests#115

For initial run I have included that here. I will then remove it once those works are merged and it should stay green.

I Tidied up the commit log, as this was originally a total experiment conducted mostly using web interface.

@Lewiscowles1986
Lewiscowles1986 requested a review from a team as a code owner March 11, 2021 12:48
@Lewiscowles1986
Lewiscowles1986 force-pushed the pr-to-fix-gha-wip branch 5 times, most recently from b49a10e to 12509ac Compare March 11, 2021 13:04
Comment thread .github/workflows/testing.yml Outdated
steps:

- name: Test connect to MySQL
run: mysql -uroot -proot -h127.0.0.1 -P${{ job.services.mysql.ports[3306] }} -e "SHOW DATABASES"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this canary can be removed I guess. I mostly wanted to shed all the potential that the behat and testing side was messing up path or not receiving environment variables.

@Lewiscowles1986

Copy link
Copy Markdown
Contributor Author

I'd marked the failures as allowed failures. They are all PHP8 being specific about the phpunit this seems to require to pass.

Comment thread .github/workflows/testing.yml Outdated
fail-fast: false
matrix:
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the removal does not stop PHP8 running, but to remove combinations, and continue using exclude, this seemed necessary.

Comment thread .github/workflows/testing.yml Outdated
- php: '8.0'
wp: 'latest'
mysql: '8.0'
experimental: true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the only test case missing from the default matrix.

Comment thread .github/workflows/testing.yml Outdated
extensions: mysql, zip
coverage: none
tools: composer
tools: composer, phpunit:5.7.27

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifying this here, I had hoped would mean there would be only one phpunit.

Comment thread features/install-wp-tests.feature Outdated
"""

When I run `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
When I run `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib /usr/local/bin/phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really this should become part of the PATH that can be specified to the test suite, but this does a for-now fix and it will only ever be for GitHub Actions. 🤷

Comment thread features/install-wp-tests.feature Outdated
"""

When I run `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
When I run `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib /usr/local/bin/phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schlessera

Copy link
Copy Markdown
Member

I've rebased this PR and reverted the changes to the GHA testing setup, so that I can merge the fixes to the templates/install-wp-tests.sh file to give due credit.

@schlessera schlessera changed the title Fix WiP Branch Add missing clean-up in templates/install-wp-tests.sh Mar 25, 2021
@schlessera schlessera added bug command:scaffold-plugin-tests Related to 'scaffold plugin-tests' command command:scaffold-theme-tests Related to 'scaffold theme-tests' command labels Mar 25, 2021
@schlessera schlessera added this to the 2.0.13 milestone Mar 25, 2021
@schlessera
schlessera merged commit 2d4bdad into wp-cli:fix/gha-functional-tests-update Mar 25, 2021
@schlessera

Copy link
Copy Markdown
Member

Thanks for all the work, @Lewiscowles1986 !

@Lewiscowles1986

Copy link
Copy Markdown
Contributor Author

Thanks @schlessera it wasn't credit I was after, but thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug command:scaffold-plugin-tests Related to 'scaffold plugin-tests' command command:scaffold-theme-tests Related to 'scaffold theme-tests' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants