diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index 055a55ab18280..99ea85837b16e 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -53,7 +53,8 @@ runs: --offline \ --show-diff \ --show-slow 1000 \ - --set-timeout 120 + --set-timeout 120 \ + -s test-summary.txt - uses: actions/upload-artifact@v4 if: always() && inputs.testArtifacts != null with: diff --git a/.github/actions/test-macos/action.yml b/.github/actions/test-macos/action.yml index 029ca2edb966d..88c593b473367 100644 --- a/.github/actions/test-macos/action.yml +++ b/.github/actions/test-macos/action.yml @@ -29,7 +29,8 @@ runs: --offline \ --show-diff \ --show-slow 1000 \ - --set-timeout 120 + --set-timeout 120 \ + -s test-summary.txt - uses: actions/upload-artifact@v4 if: always() && inputs.testArtifacts != null with: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 52a323c581488..8ce3038ece863 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -145,6 +145,9 @@ jobs: - name: Verify generated files are up to date if: ${{ !matrix.asan }} uses: ./.github/actions/verify-generated-files + - name: Add test results to the CI run summary + run: | + echo test-summary.txt >> $GITHUB_STEP_SUMMARY MACOS_DEBUG_NTS: if: github.repository_owner == 'php' || github.event_name == 'pull_request' strategy: @@ -187,6 +190,9 @@ jobs: -d opcache.enable_cli=1 - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files + - name: Add test results to the CI run summary + run: | + echo test-summary.txt >> $GITHUB_STEP_SUMMARY WINDOWS: if: github.repository_owner == 'php' || github.event_name == 'pull_request' name: WINDOWS_X64_ZTS diff --git a/run-tests.php b/run-tests.php index 5837a1a85000c..d4c34706d83a5 100755 --- a/run-tests.php +++ b/run-tests.php @@ -903,11 +903,7 @@ function save_results(string $output_file, bool $prompt_to_save_results): void { global $sum_results, $failed_test_summary, $PHP_FAILED_TESTS, $php; - if (getenv('NO_INTERACTION') || TRAVIS_CI) { - return; - } - - if ($prompt_to_save_results) { + if ($prompt_to_save_results && !getenv('NO_INTERACTION') && !TRAVIS_CI) { /* We got failed Tests, offer the user to save a QA report */ $fp = fopen("php://stdin", "r+"); if ($sum_results['FAILED'] || $sum_results['BORKED'] || $sum_results['WARNED'] || $sum_results['LEAKED']) { @@ -3032,8 +3028,8 @@ function get_summary(bool $show_ext_summary): string ===================================================================== TEST RESULT SUMMARY --------------------------------------------------------------------- -Exts skipped : ' . sprintf('%5d', count($exts_skipped)) . ($exts_skipped ? ' (' . implode(', ', $exts_skipped) . ')' : '') . ' -Exts tested : ' . sprintf('%5d', count($exts_tested)) . ' +Exts skipped : ' . sprintf('%5d', $exts_skipped ? count($exts_skipped) : 0) . ($exts_skipped ? ' (' . implode(', ', $exts_skipped) . ')' : '') . ' +Exts tested : ' . sprintf('%5d', $exts_tested ? count($exts_tested) : 0) . ' --------------------------------------------------------------------- '; }