Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update internal testing scripts #1440

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading