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

Add a job for running the HTML API tests. #7602

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
55b9106
Add a job for running the HTML API tests.
desrosj Oct 21, 2024
ced4c98
Pass group to reusable workflow.
desrosj Oct 21, 2024
4d8b375
Use correct input name.
desrosj Oct 21, 2024
405a919
Create new matrix for specific groups.
desrosj Oct 21, 2024
48708a8
Merge remote-tracking branch 'upstream/trunk' into try/html5lib-tests…
desrosj Nov 7, 2024
5ebc940
Merge remote-tracking branch 'upstream/trunk' into try/html5lib-tests…
desrosj Dec 17, 2024
693e642
Try pulling specific test groups up to top.
desrosj Dec 17, 2024
8bc2478
Use the latest LTS version of MySQL.
desrosj Dec 17, 2024
91dbe73
Fix matrix value reference.
desrosj Dec 17, 2024
3b88447
Try different nesting.
desrosj Dec 17, 2024
6f9c9f1
Tweak nesting again.
desrosj Dec 17, 2024
40aade0
Use workflow in PR branch.
desrosj Dec 17, 2024
f2d849d
Does nesting only work for one `/`?
desrosj Dec 17, 2024
c196823
Correctly nest with or without test group input.
desrosj Dec 17, 2024
094471a
Clean up conditions.
desrosj Dec 17, 2024
f2110f0
Final name cleanup.
desrosj Dec 17, 2024
52b2d32
Remove log file unintentionally included.
desrosj Dec 17, 2024
db91376
Confirm multiple combinations build out names correctly.
desrosj Dec 17, 2024
f0b6f9a
Reset the test matrix to remove unnecessary combos.
desrosj Dec 17, 2024
e1925e1
Rely on default values for inputs when possible.
desrosj Dec 17, 2024
76ff954
Include DB version to avoid failure from default changes.
desrosj Dec 17, 2024
ea9e3c2
Add a few more PHP versions.
desrosj Dec 17, 2024
1388d88
Merge remote-tracking branch 'upstream/trunk' into try/html5lib-tests…
desrosj Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
#
test-with-mysql:
name: PHP ${{ matrix.php }}
uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk
uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
permissions:
contents: read
secrets: inherit
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
#
test-with-mariadb:
name: PHP ${{ matrix.php }}
uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk
uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
permissions:
contents: read
secrets: inherit
Expand Down Expand Up @@ -154,13 +154,35 @@ jobs:
phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
report: ${{ matrix.report || false }}

#
# Runs specific individual test groups.
#
specific-test-groups:
name: ${{ matrix.phpunit-test-groups }}
uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
permissions:
contents: read
secrets: inherit
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
php: [ '7.2', '7.4', '8.0', '8.4' ]
db-version: [ '8.4' ]
phpunit-test-groups: [ 'html-api-html5lib-tests' ]

with:
php: ${{ matrix.php }}
db-version: ${{ matrix.db-version }}
phpunit-test-groups: ${{ matrix.phpunit-test-groups }}

slack-notifications:
name: Slack Notifications
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
permissions:
actions: read
contents: read
needs: [ test-with-mysql, test-with-mariadb ]
needs: [ test-with-mysql, test-with-mariadb, specific-test-groups ]
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-phpunit-tests-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
# - Checks out the WordPress Test reporter repository.
# - Submit the test results to the WordPress.org host test results.
phpunit-tests:
name: PHP ${{ inputs.php }} ${{ ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.phpunit-test-groups && format( ' ({0})', inputs.phpunit-test-groups ) || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
name: ${{ inputs.phpunit-test-groups && format( '{0} / ', inputs.phpunit-test-groups ) || '' }}PHP ${{ inputs.php }} ${{ ! inputs.phpunit-test-groups && ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
runs-on: ${{ inputs.os }}
timeout-minutes: ${{ inputs.coverage-report && 120 || 20 }}

Expand Down
Loading