File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,7 +104,24 @@ jobs:
104104 dependency-versions : " ${{ matrix.dependency-versions }}"
105105
106106 - name : " Run PHPUnit"
107- run : " vendor/bin/phpunit"
107+ run : |
108+ vendor/bin/phpunit --testdox 2>&1 | tee /tmp/phpunit-output.txt
109+ exit ${PIPESTATUS[0]}
110+
111+ - name : " Post PHPUnit output on failure"
112+ if : failure()
113+ uses : actions/github-script@v7
114+ with :
115+ script : |
116+ const fs = require('fs');
117+ const output = fs.readFileSync('/tmp/phpunit-output.txt', 'utf8');
118+ const body = `## PHPUnit failure: PHP ${{ matrix.php-version }}, ClickHouse ${{ matrix.clickhouse-version }}\n\`\`\`\n${output.slice(-3000)}\n\`\`\``;
119+ await github.rest.issues.createComment({
120+ owner: context.repo.owner,
121+ repo: context.repo.repo,
122+ issue_number: context.issue.number,
123+ body: body
124+ });
108125
109126 upload_coverage :
110127 name : " Upload coverage to Codecov"
You can’t perform that action at this time.
0 commit comments