Merge pull request #2 from ritchxu/ritchxu/pr-feedbacks

Skip markdown file
This commit is contained in:
Ray Xu 2024-04-06 16:40:00 -07:00 committed by GitHub
commit 3816496a0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 7 deletions

5
dist/index.js generated vendored
View file

@ -256,7 +256,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(2186)); const core = __importStar(__nccwpck_require__(2186));
const github = __importStar(__nccwpck_require__(5438)); const github = __importStar(__nccwpck_require__(5438));
const fs = __importStar(__nccwpck_require__(7147));
const artifact_provider_1 = __nccwpck_require__(7171); const artifact_provider_1 = __nccwpck_require__(7171);
const local_file_provider_1 = __nccwpck_require__(9399); const local_file_provider_1 = __nccwpck_require__(9399);
const get_annotations_1 = __nccwpck_require__(5867); const get_annotations_1 = __nccwpck_require__(5867);
@ -398,9 +397,7 @@ class TestReporter {
const summary = (0, get_report_1.getReport)(results, { listSuites, listTests, baseUrl, onlySummary, useActionsSummary, badgeTitle }); const summary = (0, get_report_1.getReport)(results, { listSuites, listTests, baseUrl, onlySummary, useActionsSummary, badgeTitle });
core.info('Summary content:'); core.info('Summary content:');
core.info(summary); core.info(summary);
yield fs.promises.writeFile(this.path.replace('*.trx', 'test-summary.md'), summary); yield core.summary.addRaw(summary).write();
core.info('File content:');
core.info(fs.readFileSync(this.path.replace('*.trx', 'test-summary.md'), 'utf8'));
} }
else { else {
core.info(`Creating check run ${name}`); core.info(`Creating check run ${name}`);

View file

@ -171,9 +171,7 @@ class TestReporter {
core.info('Summary content:') core.info('Summary content:')
core.info(summary) core.info(summary)
await fs.promises.writeFile(this.path.replace('*.trx', 'test-summary.md'), summary) await core.summary.addRaw(summary).write()
core.info('File content:')
core.info(fs.readFileSync(this.path.replace('*.trx', 'test-summary.md'), 'utf8'))
} else { } else {
core.info(`Creating check run ${name}`) core.info(`Creating check run ${name}`)
const createResp = await this.octokit.rest.checks.create({ const createResp = await this.octokit.rest.checks.create({