artes 1.5.3 → 1.5.5
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/docs/ciExecutors.md
CHANGED
|
@@ -8,20 +8,20 @@ This document describes the environment variables used to identify which CI/CD r
|
|
|
8
8
|
|
|
9
9
|
The reporter inspects environment variables at runtime to detect the current CI/CD platform. **No configuration is needed** — simply ensure the variables below are present in your environment, and the correct runner will be shown in the report automatically.
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Supported Platforms
|
|
12
12
|
|
|
13
13
|
| Platform | Auto-detected via |
|
|
14
14
|
| --------------------- | ---------------------------------- |
|
|
15
|
-
| **GitHub Actions** | `GITHUB_RUN_ID` |
|
|
16
|
-
| **Jenkins** | `JENKINS_HOME` |
|
|
17
|
-
| **GitLab CI** | `CI_PIPELINE_ID` |
|
|
18
|
-
| **Bitbucket Pipelines** | `BITBUCKET_BUILD_NUMBER` |
|
|
19
|
-
| **CircleCI** | `CIRCLE_WORKFLOW_ID` |
|
|
20
|
-
| **Azure Pipelines** | `BUILD_BUILDID` |
|
|
21
|
-
| **TeamCity** | `BUILD_NUMBER` + `TEAMCITY_VERSION`|
|
|
22
|
-
| **Travis CI** | `TRAVIS_BUILD_NUMBER` |
|
|
23
|
-
| **Bamboo** | `bamboo_buildNumber` |
|
|
24
|
-
| **Local
|
|
15
|
+
| [**GitHub Actions**](#github-actions) | `GITHUB_RUN_ID` |
|
|
16
|
+
| [**Jenkins**](#jenkins) | `JENKINS_HOME` |
|
|
17
|
+
| [**GitLab CI**](#gitlab-ci) | `CI_PIPELINE_ID` |
|
|
18
|
+
| [**Bitbucket Pipelines**](#bitbucket-pipelines) | `BITBUCKET_BUILD_NUMBER` |
|
|
19
|
+
| [**CircleCI**](#circleci) | `CIRCLE_WORKFLOW_ID` |
|
|
20
|
+
| [**Azure Pipelines**](#azure-pipelines) | `BUILD_BUILDID` |
|
|
21
|
+
| [**TeamCity**](#teamcity) | `BUILD_NUMBER` + `TEAMCITY_VERSION`|
|
|
22
|
+
| [**Travis CI**](#travis-ci) | `TRAVIS_BUILD_NUMBER` |
|
|
23
|
+
| [**Bamboo**](#bamboo) | `bamboo_buildNumber` |
|
|
24
|
+
| [**Local Manual Run**](#local-manual-run) | Fallback — shown as "Local Run" |
|
|
25
25
|
|
|
26
26
|
When none of the above variables are present, the executor is shown as **Manual Execution** in the report.
|
|
27
27
|
|
|
@@ -42,7 +42,7 @@ When none of the above variables are present, the executor is shown as **Manual
|
|
|
42
42
|
|
|
43
43
|
## Supported CI/CD Platforms
|
|
44
44
|
|
|
45
|
-
###
|
|
45
|
+
### GitHub Actions
|
|
46
46
|
|
|
47
47
|
Automatically detected when running inside a GitHub Actions workflow.
|
|
48
48
|
|
|
@@ -57,7 +57,7 @@ Automatically detected when running inside a GitHub Actions workflow.
|
|
|
57
57
|
|
|
58
58
|
---
|
|
59
59
|
|
|
60
|
-
###
|
|
60
|
+
### Jenkins
|
|
61
61
|
|
|
62
62
|
Detected when `JENKINS_HOME` is set in the environment.
|
|
63
63
|
|
|
@@ -72,7 +72,7 @@ Detected when `JENKINS_HOME` is set in the environment.
|
|
|
72
72
|
|
|
73
73
|
---
|
|
74
74
|
|
|
75
|
-
###
|
|
75
|
+
### GitLab CI
|
|
76
76
|
|
|
77
77
|
Detected when `CI_PIPELINE_ID` is set in the environment.
|
|
78
78
|
|
|
@@ -86,7 +86,7 @@ Detected when `CI_PIPELINE_ID` is set in the environment.
|
|
|
86
86
|
|
|
87
87
|
---
|
|
88
88
|
|
|
89
|
-
###
|
|
89
|
+
### Bitbucket Pipelines
|
|
90
90
|
|
|
91
91
|
Detected when `BITBUCKET_BUILD_NUMBER` is set in the environment.
|
|
92
92
|
|
|
@@ -99,7 +99,7 @@ Detected when `BITBUCKET_BUILD_NUMBER` is set in the environment.
|
|
|
99
99
|
|
|
100
100
|
---
|
|
101
101
|
|
|
102
|
-
###
|
|
102
|
+
### CircleCI
|
|
103
103
|
|
|
104
104
|
Detected when `CIRCLE_WORKFLOW_ID` is set in the environment.
|
|
105
105
|
|
|
@@ -113,7 +113,7 @@ Detected when `CIRCLE_WORKFLOW_ID` is set in the environment.
|
|
|
113
113
|
|
|
114
114
|
---
|
|
115
115
|
|
|
116
|
-
###
|
|
116
|
+
### Azure Pipelines
|
|
117
117
|
|
|
118
118
|
Detected when `BUILD_BUILDID` is set in the environment.
|
|
119
119
|
|
|
@@ -126,7 +126,7 @@ Detected when `BUILD_BUILDID` is set in the environment.
|
|
|
126
126
|
|
|
127
127
|
---
|
|
128
128
|
|
|
129
|
-
###
|
|
129
|
+
### TeamCity
|
|
130
130
|
|
|
131
131
|
Detected when **both** `BUILD_NUMBER` and `TEAMCITY_VERSION` are set.
|
|
132
132
|
|
|
@@ -140,7 +140,7 @@ Detected when **both** `BUILD_NUMBER` and `TEAMCITY_VERSION` are set.
|
|
|
140
140
|
|
|
141
141
|
---
|
|
142
142
|
|
|
143
|
-
###
|
|
143
|
+
### Travis CI
|
|
144
144
|
|
|
145
145
|
Detected when `TRAVIS_BUILD_NUMBER` is set in the environment.
|
|
146
146
|
|
|
@@ -153,7 +153,7 @@ Detected when `TRAVIS_BUILD_NUMBER` is set in the environment.
|
|
|
153
153
|
|
|
154
154
|
---
|
|
155
155
|
|
|
156
|
-
###
|
|
156
|
+
### Bamboo
|
|
157
157
|
|
|
158
158
|
Detected when `bamboo_buildNumber` is set in the environment.
|
|
159
159
|
|
|
@@ -166,7 +166,7 @@ Detected when `bamboo_buildNumber` is set in the environment.
|
|
|
166
166
|
|
|
167
167
|
---
|
|
168
168
|
|
|
169
|
-
###
|
|
169
|
+
### Local Manual Run
|
|
170
170
|
|
|
171
171
|
If **none** of the above variables are detected, the report will show **"Local Run"** with build name `"Manual Execution"`. This is the default fallback for local development.
|
|
172
172
|
|
|
@@ -195,4 +195,4 @@ export GITHUB_RUN_NUMBER=1
|
|
|
195
195
|
export GITHUB_SERVER_URL=https://github.com
|
|
196
196
|
export GITHUB_REPOSITORY=my-org/my-repo
|
|
197
197
|
|
|
198
|
-
```
|
|
198
|
+
```
|
package/package.json
CHANGED
|
@@ -49,14 +49,6 @@ function applyLogo(cucumberConfig, report, today, reportName, logoBuffer, logoMi
|
|
|
49
49
|
if (testCoverage) {
|
|
50
50
|
const meetsThreshold = testCoverage.percentage >= testPercentage;
|
|
51
51
|
|
|
52
|
-
if (meetsThreshold) {
|
|
53
|
-
console.log(`✅ Tests passed required ${testPercentage}% success rate with ${testCoverage.percentage.toFixed(2)}%!`);
|
|
54
|
-
process.env.EXIT_CODE = parseInt(0, 10);
|
|
55
|
-
} else {
|
|
56
|
-
console.log(`❌ Tests failed required ${testPercentage}% success rate with ${testCoverage.percentage.toFixed(2)}%!`);
|
|
57
|
-
process.env.EXIT_CODE = parseInt(1, 10);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
52
|
testCoverageWidgetCss = generateTestCoverageWidgetCss(testCoverage, testPercentage, meetsThreshold);
|
|
61
53
|
}
|
|
62
54
|
}
|
|
@@ -100,21 +92,9 @@ function generateTestCoverageWidgetCss(testCoverage, testPercentage, meetsThresh
|
|
|
100
92
|
const statusLine = `Tests ${statusVerb} \u2014 required ${testPercentage}% with ${pctLabel}%`;
|
|
101
93
|
|
|
102
94
|
|
|
103
|
-
const r1 = (fill * 0.35).toFixed(2);
|
|
104
|
-
const r2 = (fill * 0.60).toFixed(2);
|
|
105
|
-
const tm = testPercentage;
|
|
106
95
|
|
|
107
|
-
|
|
108
|
-
linear-gradient(to right,
|
|
109
|
-
transparent calc(${tm}% - 1.5px),
|
|
110
|
-
rgba(255,255,255,.95) calc(${tm}% - 1.5px),
|
|
111
|
-
rgba(255,255,255,.95) calc(${tm}% + 1.5px),
|
|
112
|
-
transparent calc(${tm}% + 1.5px)
|
|
113
|
-
),
|
|
114
|
-
linear-gradient(to right, #f44336 0%, #ff9800 35%, #ffeb3b 60%, #4caf50 100%)
|
|
115
|
-
`.trim();
|
|
96
|
+
const barGradient = `linear-gradient(to right, #f44336 0%, #ff9800 35%, #ffeb3b 60%, #4caf50 100%)`;
|
|
116
97
|
|
|
117
|
-
const pointerX = `${fillPct}%`;
|
|
118
98
|
const svgLabels = [
|
|
119
99
|
{ val: "0", x: "0%", anchor: "start" },
|
|
120
100
|
{ val: "20", x: "20%", anchor: "middle" },
|
|
@@ -127,15 +107,16 @@ function generateTestCoverageWidgetCss(testCoverage, testPercentage, meetsThresh
|
|
|
127
107
|
const labelNodes = svgLabels
|
|
128
108
|
.map(l => `<text x="${l.x}" y="10" text-anchor="${l.anchor}" font-family="sans-serif" font-size="10" fill="#bbb">${l.val}</text>`)
|
|
129
109
|
.join("");
|
|
130
|
-
|
|
131
|
-
|
|
110
|
+
|
|
111
|
+
const pointerColor = meetsThreshold ? "#4caf50" : "#f44336";
|
|
112
|
+
const px = (fill * 10).toFixed(1);
|
|
132
113
|
|
|
133
114
|
const labelPointerSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="18">
|
|
134
115
|
<text x="${fillPct}%" y="14" text-anchor="middle" font-family="sans-serif" font-size="11" font-weight="700" fill="${pointerColor}">${pctLabel}%</text>
|
|
135
116
|
</svg>`;
|
|
136
117
|
|
|
137
118
|
const stemSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 18" preserveAspectRatio="none" width="100%" height="18">
|
|
138
|
-
<line x1="${px}" y1="
|
|
119
|
+
<line x1="${px}" y1="6" x2="${px}" y2="10" stroke="${pointerColor}" stroke-width="6"/>
|
|
139
120
|
<polygon points="${parseFloat(px)-12},8 ${parseFloat(px)+12},8 ${parseFloat(px)},18" fill="${pointerColor}"/>
|
|
140
121
|
</svg>`;
|
|
141
122
|
|
|
@@ -208,7 +189,7 @@ const pointerColor = meetsThreshold ? "#4caf50" : "#f44336";
|
|
|
208
189
|
z-index: 2;
|
|
209
190
|
}
|
|
210
191
|
|
|
211
|
-
/* 3. Pointer
|
|
192
|
+
/* 3. Pointer + threshold marker layered in one element */
|
|
212
193
|
[data-id="summary"] .widget__body > div > *:first-child {
|
|
213
194
|
position: relative;
|
|
214
195
|
}
|
|
@@ -220,9 +201,8 @@ const pointerColor = meetsThreshold ? "#4caf50" : "#f44336";
|
|
|
220
201
|
left: 16px;
|
|
221
202
|
right: 16px;
|
|
222
203
|
height: 36px;
|
|
223
|
-
/* label on top (18px), stem+triangle below (18px) */
|
|
224
204
|
background-image: url("${pointerLabelDataUrl}"), url("${pointerDataUrl}");
|
|
225
|
-
background-repeat: no-repeat
|
|
205
|
+
background-repeat: no-repeat;
|
|
226
206
|
background-size: 100% 50%, 100% 50%;
|
|
227
207
|
background-position: top, bottom;
|
|
228
208
|
pointer-events: none;
|
|
@@ -295,7 +275,7 @@ function resolveLogoPath(logoConfig) {
|
|
|
295
275
|
: path.resolve(process.cwd(), logoConfig);
|
|
296
276
|
|
|
297
277
|
if (!fs.existsSync(resolved)) {
|
|
298
|
-
|
|
278
|
+
// console.warn(`[artes] Warning: logo not found at "${resolved}". Falling back to default logo.`);
|
|
299
279
|
return defaultLogoPath();
|
|
300
280
|
}
|
|
301
281
|
|
|
@@ -360,7 +340,7 @@ function inferExtFromMime(mime) {
|
|
|
360
340
|
}
|
|
361
341
|
|
|
362
342
|
function generateCss(report, today, reportName, logoUrl) {
|
|
363
|
-
return `.side-nav{width:200px !important}.side-nav__brand{background:url('${logoUrl}') no-repeat center left !important;background-size:contain !important;height:80px;width:200px;display:flex !important;align-items:center;padding-left:80px}.side-nav__brand img,.side-nav__brand svg{display:none !important}.side-nav__brand-text{font-size:0 !important;display:block !important;padding: 0 8px;}.side-nav__brand-text::after{content:'${report.brandName}';font-size:
|
|
343
|
+
return `.side-nav{background: #091628 !important; max-width:200px !important}.side-nav__brand{background:url('${logoUrl}') no-repeat center left !important;background-size:contain !important;height:80px;width:200px;display:flex !important;align-items:center;padding-left:80px}.side-nav__brand img,.side-nav__brand svg{display:none !important}.side-nav__brand-text{font-size:0 !important;display:block !important;padding: 0 8px;}.side-nav__brand-text::after{content:'${report.brandName}';font-size:23px;color:white;}.widget__title{font-weight:lighter;margin-bottom:15px;margin-top:0;text-transform:uppercase}.widget__flex-line:first-child .widget__title{font-size:0}.widget__flex-line:first-child .widget__title::before{content:'${reportName} ${today}';font-size:18px;font-weight:lighter;text-transform:uppercase}.widget__flex-line:first-child .widget__subtitle{font-size:14px}.widget__flex-line:not(:first-child) .widget__title{font-size:inherit;font-weight:lighter}`;
|
|
364
344
|
}
|
|
365
345
|
|
|
366
346
|
function injectCssAndReturn(cssPath, dynamicCss) {
|