Skip to content

Commit

Permalink
added test.html_url testsuite attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
nikordaris committed Feb 8, 2022
1 parent c71ffc2 commit ee1464a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ exports.traceTestCase = exports.traceTestSuite = exports.traceJunitArtifact = vo
const api_1 = __nccwpck_require__(5163);
const junit2json_1 = __nccwpck_require__(8027);
const fs = __importStar(__nccwpck_require__(5747));
const github = __importStar(__nccwpck_require__(5438));
async function traceJunitArtifact({ trace, tracer, path, startTime, }) {
const xmlString = fs.readFileSync(path, { encoding: "utf-8" });
const result = await (0, junit2json_1.parse)(xmlString);
Expand Down Expand Up @@ -300,6 +301,7 @@ function traceTestSuite({ testSuite, trace, tracer, startTime, parentSpan, paren
"test.package": testSuite.package,
"test.system.out": testSuite["system-out"],
"test.system.err": testSuite["system-err"],
"test.html_url": `https://github.com/${github.context.repo.owner}/${github.context.repo.repo}/${testSuite.name}`,
},
}, ctx);
let code = api_1.SpanStatusCode.OK;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "otel-upload-test-artifact-action",
"version": "1.0.1",
"version": "1.1.0",
"description": "Action that Uploads OTLP log file to GH Artifact",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions src/trace-junit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from "@opentelemetry/api";
import { parse, TestCase, TestSuite, TestSuites } from "junit2json";
import * as fs from "fs";
import * as github from "@actions/github";

export type TraceJunitArtifactParams = {
trace: TraceAPI;
Expand Down Expand Up @@ -124,6 +125,7 @@ export function traceTestSuite({
"test.package": testSuite.package,
"test.system.out": testSuite["system-out"],
"test.system.err": testSuite["system-err"],
"test.html_url": `https://github.com/${github.context.repo.owner}/${github.context.repo.repo}/${testSuite.name}`,
},
},
ctx
Expand Down

0 comments on commit ee1464a

Please sign in to comment.