@testomatio/reporter 1.0.4 → 1.0.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +8 -0
- package/lib/pipe/testomatio.js +17 -1
- package/package.json +1 -1
package/Changelog.md
CHANGED
package/lib/pipe/testomatio.js
CHANGED
|
@@ -38,7 +38,7 @@ class TestomatioPipe {
|
|
|
38
38
|
// do not finish this run (for parallel testing)
|
|
39
39
|
this.proceed = process.env.TESTOMATIO_PROCEED;
|
|
40
40
|
this.runId = params.runId || process.env.runId;
|
|
41
|
-
this.createNewTests = !!process.env.TESTOMATIO_CREATE;
|
|
41
|
+
this.createNewTests = params.createNewTests ?? !!process.env.TESTOMATIO_CREATE;
|
|
42
42
|
this.hasUnmatchedTests = false;
|
|
43
43
|
|
|
44
44
|
if (!isValidUrl(this.url.trim())) {
|
|
@@ -53,8 +53,24 @@ class TestomatioPipe {
|
|
|
53
53
|
async createRun() {
|
|
54
54
|
if (!this.isEnabled) return;
|
|
55
55
|
|
|
56
|
+
let buildUrl = process.env.BUILD_URL || process.env.CI_JOB_URL || process.env.CIRCLE_BUILD_URL;
|
|
57
|
+
|
|
58
|
+
// GitHub Actions Url
|
|
59
|
+
if (!buildUrl && process.env.GITHUB_RUN_ID) {
|
|
60
|
+
buildUrl = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Azure DevOps Url
|
|
64
|
+
if (!buildUrl && process.env.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI) {
|
|
65
|
+
const collectionUri = process.env.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI;
|
|
66
|
+
const project = process.env.SYSTEM_TEAMPROJECT;
|
|
67
|
+
const buildId = process.env.BUILD_BUILDID;
|
|
68
|
+
buildUrl = `${collectionUri}/${project}/_build/results?buildId=${buildId}`;
|
|
69
|
+
}
|
|
70
|
+
|
|
56
71
|
const runParams = Object.fromEntries(
|
|
57
72
|
Object.entries({
|
|
73
|
+
ci_build_url: buildUrl,
|
|
58
74
|
parallel: this.parallel,
|
|
59
75
|
api_key: this.apiKey.trim(),
|
|
60
76
|
group_title: this.groupTitle,
|