File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,12 +108,20 @@ jobs:
108108 vendor/bin/phpunit --testdox 2>&1 | tee /tmp/phpunit-output.txt
109109 exit ${PIPESTATUS[0]}
110110
111- - name : " Upload PHPUnit output"
111+ - name : " Post PHPUnit output on failure "
112112 if : failure()
113- uses : actions/upload-artifact @v7
113+ uses : actions/github-script @v7
114114 with :
115- name : " phpunit-${{ matrix.clickhouse-version }}-${{ matrix.php-version }}.output"
116- path : " /tmp/phpunit-output.txt"
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+ });
117125
118126 upload_coverage :
119127 name : " Upload coverage to Codecov"
You can’t perform that action at this time.
0 commit comments