Skip to content

Commit

Permalink
Merge pull request #1440 from hydephp/update-internal-scripts
Browse files Browse the repository at this point in the history
Update internal testing scripts
  • Loading branch information
caendesilva committed Nov 8, 2023
2 parents 0be3136 + ca530ef commit c875997
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Expand Up @@ -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 }}
2 changes: 2 additions & 0 deletions monorepo/scripts/ping-ci-server-with-type-coverage.php
Expand Up @@ -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
Expand All @@ -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';
Expand Down

0 comments on commit c875997

Please sign in to comment.