mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 06:47:09 +01:00
fix: only push results when the url is set
This commit is contained in:
parent
108abd4de9
commit
59060a80a8
2 changed files with 42 additions and 38 deletions
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
|
|
@ -192,7 +192,7 @@ class TestReporter {
|
|||
}
|
||||
}
|
||||
run() {
|
||||
var _a;
|
||||
var _a, _b;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (this.workDirInput) {
|
||||
core.info(`Changing directory to '${this.workDirInput}'`);
|
||||
|
|
@ -218,6 +218,7 @@ class TestReporter {
|
|||
const parser = this.getParser(this.reporter, options);
|
||||
const results = [];
|
||||
const input = yield inputProvider.load();
|
||||
if (((_a = this.resultsEndpoint) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
||||
try {
|
||||
const readStream = input.trxZip.toBuffer();
|
||||
const version = fs_1.default.existsSync('test/EVA.TestSuite.Core/bin/Release/version.txt')
|
||||
|
|
@ -234,6 +235,7 @@ class TestReporter {
|
|||
catch (ex) {
|
||||
core.warning(`Could not upload TRX ZIP file: ${ex}`);
|
||||
}
|
||||
}
|
||||
for (const [reportName, files] of Object.entries(input.reports)) {
|
||||
try {
|
||||
core.startGroup(`Creating test report ${reportName}`);
|
||||
|
|
@ -270,7 +272,7 @@ class TestReporter {
|
|||
core.endGroup();
|
||||
return;
|
||||
}
|
||||
core.info(`${t.name}: ${(_a = t.error) === null || _a === void 0 ? void 0 : _a.message}`);
|
||||
core.info(`${t.name}: ${(_b = t.error) === null || _b === void 0 ? void 0 : _b.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ class TestReporter {
|
|||
const results: TestRunResultWithUrl[] = []
|
||||
const input = await inputProvider.load()
|
||||
|
||||
if (this.resultsEndpoint?.length > 0) {
|
||||
try {
|
||||
const readStream = input.trxZip.toBuffer()
|
||||
const version = fs.existsSync('test/EVA.TestSuite.Core/bin/Release/version.txt')
|
||||
|
|
@ -129,6 +130,7 @@ class TestReporter {
|
|||
} catch (ex) {
|
||||
core.warning(`Could not upload TRX ZIP file: ${ex}`)
|
||||
}
|
||||
}
|
||||
|
||||
for (const [reportName, files] of Object.entries(input.reports)) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue