Skip to content

Commit 5786da2

Browse files
committed
Don't need to run the actual tests while we test these workflow changes.
1 parent 9bef715 commit 5786da2

File tree

2 files changed

+4
-129
lines changed

2 files changed

+4
-129
lines changed

.github/workflows/reusable-phpunit-tests-v3.yml

Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -197,74 +197,5 @@ jobs:
197197
docker compose run --rm php php -i
198198
docker compose run --rm php locale -a
199199
200-
- name: Install WordPress
201-
run: npm run env:install
202-
203-
- name: Run PHPUnit tests${{ inputs.phpunit-test-groups && format( ' ({0} groups)', inputs.phpunit-test-groups ) || '' }}${{ inputs.coverage-report && ' with coverage report' || '' }}
204-
continue-on-error: ${{ inputs.allow-errors }}
205-
run: |
206-
node ./tools/local-env/scripts/docker.js run \
207-
php ./vendor/bin/phpunit \
208-
--verbose \
209-
-c "${PHPUNIT_CONFIG}" \
210-
${{ inputs.phpunit-test-groups && '--group "${TEST_GROUPS}"' || '' }} \
211-
${{ inputs.coverage-report && '--coverage-clover "wp-code-coverage-${MULTISITE_FLAG}-${GITHUB_SHA}.xml" --coverage-html "wp-code-coverage-${MULTISITE_FLAG}-${GITHUB_SHA}"' || '' }}
212-
env:
213-
TEST_GROUPS: ${{ inputs.phpunit-test-groups }}
214-
MULTISITE_FLAG: ${{ inputs.multisite && 'multisite' || 'single' }}
215-
216-
- name: Run AJAX tests
217-
if: ${{ ! inputs.phpunit-test-groups && ! inputs.coverage-report }}
218-
continue-on-error: ${{ inputs.allow-errors }}
219-
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c "${PHPUNIT_CONFIG}" --group ajax
220-
221-
- name: Run ms-files tests as a multisite install
222-
if: ${{ inputs.multisite && ! inputs.phpunit-test-groups && ! inputs.coverage-report }}
223-
continue-on-error: ${{ inputs.allow-errors }}
224-
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c "${PHPUNIT_CONFIG}" --group ms-files
225-
226-
- name: Run external HTTP tests
227-
if: ${{ ! inputs.multisite && ! inputs.phpunit-test-groups && ! inputs.coverage-report }}
228-
continue-on-error: ${{ inputs.allow-errors }}
229-
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c "${PHPUNIT_CONFIG}" --group external-http
230-
231-
# __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
232-
- name: Run (Xdebug) tests
233-
if: ${{ ! inputs.phpunit-test-groups && ! inputs.coverage-report }}
234-
continue-on-error: ${{ inputs.allow-errors }}
235-
run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__
236-
237-
- name: Upload test coverage report to Codecov
238-
if: ${{ inputs.coverage-report }}
239-
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
240-
with:
241-
token: ${{ secrets.CODECOV_TOKEN }}
242-
files: wp-code-coverage${{ inputs.multisite && '-multisite' || '-single' }}-${{ github.sha }}.xml
243-
flags: ${{ inputs.multisite && 'multisite' || 'single' }},php
244-
fail_ci_if_error: true
245-
246-
- name: Upload HTML coverage report as artifact
247-
if: ${{ inputs.coverage-report }}
248-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
249-
with:
250-
name: wp-code-coverage${{ inputs.multisite && '-multisite' || '-single' }}-${{ github.sha }}
251-
path: wp-code-coverage${{ inputs.multisite && '-multisite' || '-single' }}-${{ github.sha }}
252-
overwrite: true
253-
254-
- name: Ensure version-controlled files are not modified or deleted
255-
run: git diff --exit-code
256-
257-
- name: Checkout the WordPress Test Reporter
258-
if: ${{ github.ref == 'refs/heads/trunk' && inputs.report }}
259-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
260-
with:
261-
repository: 'WordPress/phpunit-test-runner'
262-
path: 'test-runner'
263-
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
264-
persist-credentials: false
265-
266-
- name: Submit test results to the WordPress.org host test results
267-
if: ${{ github.ref == 'refs/heads/trunk' && inputs.report }}
268-
env:
269-
WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}"
270-
run: docker compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
200+
- name: Hello
201+
run: echo Hello

.github/workflows/reusable-upgrade-testing.yml

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -82,61 +82,5 @@ jobs:
8282
-e MYSQL_DATABASE="test_db"
8383
8484
steps:
85-
- name: Set up PHP ${{ inputs.php }}
86-
uses: shivammathur/setup-php@20529878ed81ef8e78ddf08b480401e6101a850f # v2.35.3
87-
with:
88-
php-version: '${{ inputs.php }}'
89-
coverage: none
90-
tools: wp-cli
91-
92-
- name: Download WordPress ${{ inputs.wp }}
93-
run: wp core download --version="${WP_VERSION}"
94-
env:
95-
WP_VERSION: ${{ inputs.wp }}
96-
97-
- name: Create wp-config.php file
98-
run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost="127.0.0.1:${DB_PORT}"
99-
env:
100-
DB_PORT: ${{ job.services.database.ports['3306'] }}
101-
102-
- name: Install WordPress
103-
run: |
104-
wp core ${{ inputs.multisite && 'multisite-install' || 'install' }} \
105-
--url=http://localhost/ --title="Upgrade Test" --admin_user=admin \
106-
--admin_password=password [email protected] --skip-email
107-
108-
- name: Pre-upgrade version check
109-
run: wp core version
110-
111-
- name: Update to the latest minor version
112-
run: wp core update --minor
113-
114-
- name: Update the database after the minor update
115-
run: wp core update-db ${{ inputs.multisite && '--network' || '' }}
116-
117-
- name: Post-upgrade version check after the minor update
118-
run: wp core version
119-
120-
- name: Download build artifact for the current branch
121-
if: ${{ inputs.new-version == 'develop' }}
122-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
123-
with:
124-
name: wordpress-develop
125-
126-
- name: Upgrade to WordPress at current branch
127-
if: ${{ inputs.new-version == 'develop' }}
128-
run: |
129-
wp core update develop.zip
130-
131-
- name: Upgrade to WordPress ${{ inputs.new-version }}
132-
if: ${{ inputs.new-version != 'develop' }}
133-
run: |
134-
wp core update ${{ 'latest' != inputs.new-version && '--version="${WP_VERSION}"' || '' }}
135-
env:
136-
WP_VERSION: ${{ inputs.new-version }}
137-
138-
- name: Update the database
139-
run: wp core update-db ${{ inputs.multisite && '--network' || '' }}
140-
141-
- name: Post-upgrade version check
142-
run: wp core version
85+
- name: Hello
86+
run: echo Hello

0 commit comments

Comments
 (0)