From e58db900a0849f187a288d3110d103d1a7da2e3b Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 13:29:23 -0400 Subject: [PATCH 01/25] Allow running the github action Removes the conditional to allow the action to run --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 77d9f0b..2225db9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest # Remove this line if Github Actions is your preferred means of running the tests. - if: ${{ false }} + # if: ${{ false }} env: # This is only a subset/example of env vars available. See the `.env.default` file for a full list. From bff22c3d26f5592d16b252c30de9e5f356d395aa Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 16:57:45 -0400 Subject: [PATCH 02/25] Temp disable cleanup --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2225db9..9c14370 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -91,4 +91,5 @@ jobs: continue-on-error: true - name: Cleanup + if: ${{ false }} run: php cleanup.php From 335e7dcecce04266b76e03cec7104db3ccd89fc1 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 17:03:59 -0400 Subject: [PATCH 03/25] Temp add envs to workflow instead of secrets --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9c14370..93ef822 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,8 +49,10 @@ jobs: env: # This is only a subset/example of env vars available. See the `.env.default` file for a full list. - WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} - WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} + WPT_PREPARE_DIR: './tmp/wp-test-runner' + WPT_TEST_DIR: 'wp-test-runner' + # WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} + # WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }} # Database settings From 8cd8b2b307b99b8ed3be3a803ceb09d19fde4a15 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 17:20:44 -0400 Subject: [PATCH 04/25] Temp disable prepare/run --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 93ef822..2f64214 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -80,9 +80,11 @@ jobs: node-version: 20 - name: Prepare environment + if: ${{ false }} run: php prepare.php - name: Run unit tests + if: ${{ false }} run: php test.php # Prevent the workflow from stopping if there are test failures. continue-on-error: true From e19691dc7808e2d50775d2ad1538a01b589f9dd9 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 17:21:39 -0400 Subject: [PATCH 05/25] Avoid double escaping --- report.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report.php b/report.php index b690f76..b97e50c 100644 --- a/report.php +++ b/report.php @@ -86,7 +86,7 @@ * remote path to ensure that the junit.xml results can be accessed or copied over SSH. */ if ( ! empty( $WPT_SSH_CONNECT ) ) { - $junit_location = '-e "ssh ' . $WPT_SSH_OPTIONS . '" ' . escapeshellarg( $WPT_SSH_CONNECT . ':' . $junit_location ); + $junit_location = '-e "ssh ' . $WPT_SSH_OPTIONS . '" ' . escapeshellarg( $WPT_SSH_CONNECT ) . ':' . $junit_location; } /** From 08ae3e95ef72bc7ef113d877041ce94b823a5b72 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 17:24:57 -0400 Subject: [PATCH 06/25] Move double quote to end --- report.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report.php b/report.php index b97e50c..97f2dee 100644 --- a/report.php +++ b/report.php @@ -86,7 +86,7 @@ * remote path to ensure that the junit.xml results can be accessed or copied over SSH. */ if ( ! empty( $WPT_SSH_CONNECT ) ) { - $junit_location = '-e "ssh ' . $WPT_SSH_OPTIONS . '" ' . escapeshellarg( $WPT_SSH_CONNECT ) . ':' . $junit_location; + $junit_location = '-e "ssh ' . $WPT_SSH_OPTIONS . ' ' . escapeshellarg( $WPT_SSH_CONNECT ) . ':' . $junit_location . '"'; } /** From 5d08bc1a71026e8162a96afe99913ff3fdc02774 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 17:26:54 -0400 Subject: [PATCH 07/25] Fix env variables --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2f64214..fc8596c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,7 +49,7 @@ jobs: env: # This is only a subset/example of env vars available. See the `.env.default` file for a full list. - WPT_PREPARE_DIR: './tmp/wp-test-runner' + WPT_PREPARE_DIR: 'tmp/wp-test-runner' WPT_TEST_DIR: 'wp-test-runner' # WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} # WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} From 37a25a50940a59dbcb18bdd37f4ed792e721ed54 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 14:28:50 -0700 Subject: [PATCH 08/25] Revert "Move double quote to end" This reverts commit 08ae3e95ef72bc7ef113d877041ce94b823a5b72. --- report.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report.php b/report.php index 97f2dee..b97e50c 100644 --- a/report.php +++ b/report.php @@ -86,7 +86,7 @@ * remote path to ensure that the junit.xml results can be accessed or copied over SSH. */ if ( ! empty( $WPT_SSH_CONNECT ) ) { - $junit_location = '-e "ssh ' . $WPT_SSH_OPTIONS . ' ' . escapeshellarg( $WPT_SSH_CONNECT ) . ':' . $junit_location . '"'; + $junit_location = '-e "ssh ' . $WPT_SSH_OPTIONS . '" ' . escapeshellarg( $WPT_SSH_CONNECT ) . ':' . $junit_location; } /** From eefac259b58ea56a8662959815830c59e3357005 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 14:30:12 -0700 Subject: [PATCH 09/25] Revert "Avoid double escaping" This reverts commit e19691dc7808e2d50775d2ad1538a01b589f9dd9. --- report.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report.php b/report.php index b97e50c..b690f76 100644 --- a/report.php +++ b/report.php @@ -86,7 +86,7 @@ * remote path to ensure that the junit.xml results can be accessed or copied over SSH. */ if ( ! empty( $WPT_SSH_CONNECT ) ) { - $junit_location = '-e "ssh ' . $WPT_SSH_OPTIONS . '" ' . escapeshellarg( $WPT_SSH_CONNECT ) . ':' . $junit_location; + $junit_location = '-e "ssh ' . $WPT_SSH_OPTIONS . '" ' . escapeshellarg( $WPT_SSH_CONNECT . ':' . $junit_location ); } /** From 9eec16df52fcd4a7b0df1c6999d25caa9715eb8d Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 14:33:09 -0700 Subject: [PATCH 10/25] Leading slash --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fc8596c..9a51206 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,7 +49,7 @@ jobs: env: # This is only a subset/example of env vars available. See the `.env.default` file for a full list. - WPT_PREPARE_DIR: 'tmp/wp-test-runner' + WPT_PREPARE_DIR: '/tmp/wp-test-runner' WPT_TEST_DIR: 'wp-test-runner' # WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} # WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} From b6456f1b5521d84f5827a2569d06c5f86c22dec0 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 14:35:47 -0700 Subject: [PATCH 11/25] Don't skip steps --- .github/workflows/tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9a51206..393c865 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -80,11 +80,9 @@ jobs: node-version: 20 - name: Prepare environment - if: ${{ false }} run: php prepare.php - name: Run unit tests - if: ${{ false }} run: php test.php # Prevent the workflow from stopping if there are test failures. continue-on-error: true @@ -95,5 +93,4 @@ jobs: continue-on-error: true - name: Cleanup - if: ${{ false }} run: php cleanup.php From 0820975e89416e67f91ecfa48691160f6401cc50 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 14:46:34 -0700 Subject: [PATCH 12/25] Dont obfuscate php --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 393c865..1d7d14d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,7 +54,8 @@ jobs: # WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} # WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} - WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }} + WPT_PHP_EXECUTABLE: 'php' + # WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }} # Database settings WPT_DB_NAME: ${{ secrets.WPT_DB_NAME }} WPT_DB_USER: ${{ secrets.WPT_DB_USER }} From 2f9e3bad19e7295d545e0702bcd1f8e93fb61361 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 14:58:59 -0700 Subject: [PATCH 13/25] Don't cleanup remote server --- cleanup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cleanup.php b/cleanup.php index e584c6c..e4d1495 100644 --- a/cleanup.php +++ b/cleanup.php @@ -2,7 +2,7 @@ /** * This script is responsible for cleaning up the test environment after a run of the WordPress PHPUnit Test Runner. * It ensures that temporary directories and files created during the test process are properly deleted. - * + * * @link https://github.com/wordpress/phpunit-test-runner/ Original source repository * @package WordPress */ @@ -48,6 +48,6 @@ */ if ( ! empty( $WPT_SSH_CONNECT ) ) { perform_operations( array( - 'ssh ' . $WPT_SSH_OPTIONS . ' ' . escapeshellarg( $WPT_SSH_CONNECT ) . ' ' . escapeshellarg( $WPT_RM_TEST_DIR_CMD ), + // 'ssh ' . $WPT_SSH_OPTIONS . ' ' . escapeshellarg( $WPT_SSH_CONNECT ) . ' ' . escapeshellarg( $WPT_RM_TEST_DIR_CMD ), ) ); } From a38e19784891dd833525b605494e41c73e6730ca Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 16:22:43 -0700 Subject: [PATCH 14/25] remove quotes --- .github/workflows/tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1d7d14d..f260e13 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,12 +49,13 @@ jobs: env: # This is only a subset/example of env vars available. See the `.env.default` file for a full list. - WPT_PREPARE_DIR: '/tmp/wp-test-runner' - WPT_TEST_DIR: 'wp-test-runner' + WPT_DEBUG: verbose + WPT_PREPARE_DIR: /tmp/wp-test-runner + WPT_TEST_DIR: wp-test-runner # WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} # WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} - WPT_PHP_EXECUTABLE: 'php' + WPT_PHP_EXECUTABLE: php # WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }} # Database settings WPT_DB_NAME: ${{ secrets.WPT_DB_NAME }} From aaccd04f1c061679d4ebb1304cf9d79f54aa242b Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 16:24:46 -0700 Subject: [PATCH 15/25] Skip cleanup --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f260e13..0fd38e5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -95,4 +95,5 @@ jobs: continue-on-error: true - name: Cleanup + if: ${{ false }} run: php cleanup.php From 106aff24c6649ea2d1e3966296e8c18e8c0ba895 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 16:43:53 -0700 Subject: [PATCH 16/25] dont prepare or test --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0fd38e5..cca3107 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -82,9 +82,11 @@ jobs: node-version: 20 - name: Prepare environment + if: ${{ false }} run: php prepare.php - name: Run unit tests + if: ${{ false }} run: php test.php # Prevent the workflow from stopping if there are test failures. continue-on-error: true From 30258ea21d70ed7aacbbd2e209bac05657362ca4 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 16:44:01 -0700 Subject: [PATCH 17/25] output the command --- report.php | 1 + 1 file changed, 1 insertion(+) diff --git a/report.php b/report.php index b690f76..d824a31 100644 --- a/report.php +++ b/report.php @@ -109,6 +109,7 @@ * the junit.xml files from the source to the destination directory. */ $junit_exec = 'rsync ' . $rsync_options . ' ' . $junit_location . ' ' . escapeshellarg( $WPT_PREPARE_DIR ); +log_message($junit_exec); perform_operations( array( $junit_exec, ) ); From b28106d1bad2c9a18b2232cef16a9884fbeed9a8 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 16:51:05 -0700 Subject: [PATCH 18/25] turn on prepare --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cca3107..9b9e874 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -82,7 +82,6 @@ jobs: node-version: 20 - name: Prepare environment - if: ${{ false }} run: php prepare.php - name: Run unit tests From 62ae5ab1ed81421b7e01e3d76674e72159838d38 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 17:03:26 -0700 Subject: [PATCH 19/25] hard code url --- report.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report.php b/report.php index d824a31..fb89a92 100644 --- a/report.php +++ b/report.php @@ -76,7 +76,7 @@ * safely used in shell commands. */ log_message('Copying junit.xml results'); -$junit_location = escapeshellarg( $WPT_TEST_DIR ) . '/tests/phpunit/build/logs/*'; +$junit_location = '/home1/sharerok/wp-test-runner/tests/phpunit/build/logs/*'; /** * Modifies the junit.xml results file path for a remote location if an SSH connection is available. From e59e3f1a273a0ffd27db32beb000e6ced5c6335f Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Thu, 19 Sep 2024 17:17:10 -0700 Subject: [PATCH 20/25] Actually allow tests to run --- .github/workflows/tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9b9e874..045c4c1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,7 +49,6 @@ jobs: env: # This is only a subset/example of env vars available. See the `.env.default` file for a full list. - WPT_DEBUG: verbose WPT_PREPARE_DIR: /tmp/wp-test-runner WPT_TEST_DIR: wp-test-runner # WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} @@ -85,7 +84,6 @@ jobs: run: php prepare.php - name: Run unit tests - if: ${{ false }} run: php test.php # Prevent the workflow from stopping if there are test failures. continue-on-error: true @@ -96,5 +94,4 @@ jobs: continue-on-error: true - name: Cleanup - if: ${{ false }} run: php cleanup.php From 1dd2655fb4b0f9e239b7e599cfb12db5d9b9e842 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Fri, 20 Sep 2024 08:56:07 -0700 Subject: [PATCH 21/25] Run with php 8.3 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 045c4c1..568fd6c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,7 +54,7 @@ jobs: # WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} # WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} - WPT_PHP_EXECUTABLE: php + WPT_PHP_EXECUTABLE: /opt/cpanel/ea-php83/root/usr/bin/php # WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }} # Database settings WPT_DB_NAME: ${{ secrets.WPT_DB_NAME }} From b2984391bc0d1cd9379a6cd181486d40a34a487d Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Fri, 20 Sep 2024 09:30:35 -0700 Subject: [PATCH 22/25] Run with 8.1. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 568fd6c..0b384cc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,7 +54,7 @@ jobs: # WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} # WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} - WPT_PHP_EXECUTABLE: /opt/cpanel/ea-php83/root/usr/bin/php + WPT_PHP_EXECUTABLE: /opt/cpanel/ea-php81/root/usr/bin/php # WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }} # Database settings WPT_DB_NAME: ${{ secrets.WPT_DB_NAME }} From 7090d2c41720614a7137e353a9bddc817fd64a1c Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Fri, 20 Sep 2024 09:39:29 -0700 Subject: [PATCH 23/25] Switch back to PHP 8.3. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0b384cc..568fd6c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,7 +54,7 @@ jobs: # WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} # WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} - WPT_PHP_EXECUTABLE: /opt/cpanel/ea-php81/root/usr/bin/php + WPT_PHP_EXECUTABLE: /opt/cpanel/ea-php83/root/usr/bin/php # WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }} # Database settings WPT_DB_NAME: ${{ secrets.WPT_DB_NAME }} From 1cb7ed705f7863936cee20f502a2df1f36709aaa Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 25 Sep 2024 12:27:50 -0400 Subject: [PATCH 24/25] Add multiple PHP versions to the test matrix. --- .github/workflows/tests.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 568fd6c..f18a806 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,6 +44,18 @@ jobs: name: Run Core PHPUnit tests runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: + - '/opt/cpanel/ea-php83/root/usr/bin/php' + - '/opt/cpanel/ea-php82/root/usr/bin/php' + - '/opt/cpanel/ea-php81/root/usr/bin/php' + - '/opt/cpanel/ea-php80/root/usr/bin/php' + - '/opt/cpanel/ea-php74/root/usr/bin/php' + - '/opt/cpanel/ea-php73/root/usr/bin/php' + - '/opt/cpanel/ea-php72/root/usr/bin/php' + # Remove this line if Github Actions is your preferred means of running the tests. # if: ${{ false }} @@ -54,7 +66,7 @@ jobs: # WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} # WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} - WPT_PHP_EXECUTABLE: /opt/cpanel/ea-php83/root/usr/bin/php + WPT_PHP_EXECUTABLE: ${{ matrix.php }} # WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }} # Database settings WPT_DB_NAME: ${{ secrets.WPT_DB_NAME }} From bd2c5e735b573cac4be82deed67acb1cf0f22f7e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 25 Sep 2024 12:32:11 -0400 Subject: [PATCH 25/25] Revert unintentional changes. --- cleanup.php | 2 +- report.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cleanup.php b/cleanup.php index e4d1495..f00cd31 100644 --- a/cleanup.php +++ b/cleanup.php @@ -48,6 +48,6 @@ */ if ( ! empty( $WPT_SSH_CONNECT ) ) { perform_operations( array( - // 'ssh ' . $WPT_SSH_OPTIONS . ' ' . escapeshellarg( $WPT_SSH_CONNECT ) . ' ' . escapeshellarg( $WPT_RM_TEST_DIR_CMD ), + 'ssh ' . $WPT_SSH_OPTIONS . ' ' . escapeshellarg( $WPT_SSH_CONNECT ) . ' ' . escapeshellarg( $WPT_RM_TEST_DIR_CMD ), ) ); } diff --git a/report.php b/report.php index fb89a92..b690f76 100644 --- a/report.php +++ b/report.php @@ -76,7 +76,7 @@ * safely used in shell commands. */ log_message('Copying junit.xml results'); -$junit_location = '/home1/sharerok/wp-test-runner/tests/phpunit/build/logs/*'; +$junit_location = escapeshellarg( $WPT_TEST_DIR ) . '/tests/phpunit/build/logs/*'; /** * Modifies the junit.xml results file path for a remote location if an SSH connection is available. @@ -109,7 +109,6 @@ * the junit.xml files from the source to the destination directory. */ $junit_exec = 'rsync ' . $rsync_options . ' ' . $junit_location . ' ' . escapeshellarg( $WPT_PREPARE_DIR ); -log_message($junit_exec); perform_operations( array( $junit_exec, ) );