diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 9a3ca0645ad..75ceff80072 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -495,10 +495,10 @@ jobs: run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - name: Run static analysis (Psalm/Shepherd) - run: vendor/bin/psalm --shepherd || true + run: vendor/bin/psalm --shepherd > psalmout.txt|| true - name: Ping CI server with type coverage results - run: php monorepo/scripts/ping-ci-server-with-type-coverage.php ${{ secrets.CI_SERVER_TOKEN }} ${{ github.sha }} master + run: php monorepo/scripts/ping-ci-server-with-type-coverage.php ${{ secrets.CI_SERVER_TOKEN }} ${{ github.sha }} master ${{ github.run_id }} run-static-analysis-phpstan: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 81df409ba50..f6433676b39 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -22,4 +22,4 @@ jobs: # Send the reports to the CI server to calculate type coverage and send back commit status checks - name: Ping CI server with type coverage results - run: php monorepo/scripts/ping-ci-server-with-type-coverage.php ${{ secrets.CI_SERVER_TOKEN }} ${{ github.event.pull_request.head.sha }} ${{ github.head_ref }} + run: php monorepo/scripts/ping-ci-server-with-type-coverage.php ${{ secrets.CI_SERVER_TOKEN }} ${{ github.event.pull_request.head.sha }} ${{ github.head_ref }} ${{ github.run_id }} diff --git a/monorepo/scripts/ping-ci-server-with-type-coverage.php b/monorepo/scripts/ping-ci-server-with-type-coverage.php index 888f7c96289..e30f001490f 100644 --- a/monorepo/scripts/ping-ci-server-with-type-coverage.php +++ b/monorepo/scripts/ping-ci-server-with-type-coverage.php @@ -14,6 +14,7 @@ $token = $argv[1] ?? exit(400); $commit = $argv[2] ?? exit(400); $branch = $argv[3] ?? 'master'; +$runId = $argv[4] ?? null; if (file_exists('psalmout.txt')) { // Count the number of errors in the output @@ -25,6 +26,7 @@ 'report' => file_get_contents('type-coverage.json') ?? exit(404), 'branch' => $branch, 'psalmErrors' => $psalmErrors ?? null, + 'runId' => $runId, ]; $url = 'https://ci.hydephp.com/api/github/actions/type-coverage';