mirror of
https://github.com/dorny/test-reporter.git
synced 2026-06-05 19:53:37 +00:00
Compare commits
No commits in common. "main" and "codex/list-files-input" have entirely different histories.
main
...
codex/list
7 changed files with 17 additions and 56 deletions
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
## 3.1.0
|
||||
* Feature: Add `list-files` input to control test report file listing https://github.com/dorny/test-reporter/pull/773
|
||||
* Feature: Add `summary_file` output with the path to the generated summary in Markdown format https://github.com/dorny/test-reporter/pull/772
|
||||
|
||||
## 3.0.0
|
||||
* Feature: Use NodeJS 24 LTS as default runtime https://github.com/dorny/test-reporter/pull/738
|
||||
|
|
|
|||
|
|
@ -225,7 +225,6 @@ jobs:
|
|||
| time | Test execution time [ms] |
|
||||
| url | Check run URL |
|
||||
| url_html | Check run URL HTML |
|
||||
| summary_file | Path to a file containing the generated test report summary in Markdown format |
|
||||
| slug_prefix| Random anchor links slug prefix generated for the summary headers |
|
||||
|
||||
## Supported formats
|
||||
|
|
|
|||
|
|
@ -130,8 +130,6 @@ outputs:
|
|||
description: Check run URL
|
||||
url_html:
|
||||
description: Check run URL HTML
|
||||
summary_file:
|
||||
description: Path to a file containing the generated test report summary in Markdown format
|
||||
slug_prefix:
|
||||
description: Random prefix added to generated report anchor slugs for this action run
|
||||
runs:
|
||||
|
|
|
|||
30
dist/index.js
generated
vendored
30
dist/index.js
generated
vendored
|
|
@ -16015,7 +16015,7 @@ module.exports.fetch = async function fetch (init, options = undefined) {
|
|||
}
|
||||
module.exports.Headers = __nccwpck_require__(660).Headers
|
||||
module.exports.Response = __nccwpck_require__(9051).Response
|
||||
module.exports.Request = __nccwpck_require__(9967).Request
|
||||
module.exports.Request = __nccwpck_require__(2348).Request
|
||||
module.exports.FormData = __nccwpck_require__(5910).FormData
|
||||
module.exports.File = globalThis.File ?? (__nccwpck_require__(4573).File)
|
||||
module.exports.FileReader = __nccwpck_require__(8355).FileReader
|
||||
|
|
@ -27430,7 +27430,7 @@ const { urlEquals, getFieldValues } = __nccwpck_require__(6798)
|
|||
const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(3440)
|
||||
const { webidl } = __nccwpck_require__(5893)
|
||||
const { Response, cloneResponse, fromInnerResponse } = __nccwpck_require__(9051)
|
||||
const { Request, fromInnerRequest } = __nccwpck_require__(9967)
|
||||
const { Request, fromInnerRequest } = __nccwpck_require__(2348)
|
||||
const { kState } = __nccwpck_require__(3627)
|
||||
const { fetching } = __nccwpck_require__(4398)
|
||||
const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(3168)
|
||||
|
|
@ -29744,7 +29744,7 @@ module.exports = {
|
|||
|
||||
const { pipeline } = __nccwpck_require__(7075)
|
||||
const { fetching } = __nccwpck_require__(4398)
|
||||
const { makeRequest } = __nccwpck_require__(9967)
|
||||
const { makeRequest } = __nccwpck_require__(2348)
|
||||
const { webidl } = __nccwpck_require__(5893)
|
||||
const { EventSourceStream } = __nccwpck_require__(4031)
|
||||
const { parseMIMEType } = __nccwpck_require__(1900)
|
||||
|
|
@ -33368,7 +33368,7 @@ const {
|
|||
fromInnerResponse
|
||||
} = __nccwpck_require__(9051)
|
||||
const { HeadersList } = __nccwpck_require__(660)
|
||||
const { Request, cloneRequest } = __nccwpck_require__(9967)
|
||||
const { Request, cloneRequest } = __nccwpck_require__(2348)
|
||||
const zlib = __nccwpck_require__(8522)
|
||||
const {
|
||||
bytesMatch,
|
||||
|
|
@ -35632,7 +35632,7 @@ module.exports = {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 9967:
|
||||
/***/ 2348:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
/* globals AbortController */
|
||||
|
|
@ -40814,7 +40814,7 @@ const {
|
|||
const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = __nccwpck_require__(8625)
|
||||
const { channels } = __nccwpck_require__(2414)
|
||||
const { CloseEvent } = __nccwpck_require__(5188)
|
||||
const { makeRequest } = __nccwpck_require__(9967)
|
||||
const { makeRequest } = __nccwpck_require__(2348)
|
||||
const { fetching } = __nccwpck_require__(4398)
|
||||
const { Headers, getHeadersList } = __nccwpck_require__(660)
|
||||
const { getDecodeSplit } = __nccwpck_require__(3168)
|
||||
|
|
@ -56445,12 +56445,6 @@ function getOctokit(token, options, ...additionalPlugins) {
|
|||
//# sourceMappingURL=github.js.map
|
||||
// EXTERNAL MODULE: external "node:crypto"
|
||||
var external_node_crypto_ = __nccwpck_require__(7598);
|
||||
;// CONCATENATED MODULE: external "node:fs"
|
||||
const external_node_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs");
|
||||
;// CONCATENATED MODULE: external "node:os"
|
||||
const external_node_os_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:os");
|
||||
;// CONCATENATED MODULE: external "node:path"
|
||||
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path");
|
||||
// EXTERNAL MODULE: ./node_modules/adm-zip/adm-zip.js
|
||||
var adm_zip = __nccwpck_require__(1316);
|
||||
// EXTERNAL MODULE: ./node_modules/picomatch/index.js
|
||||
|
|
@ -58938,9 +58932,6 @@ class NetteTesterJunitParser {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -59098,7 +59089,6 @@ class TestReporter {
|
|||
}, shortSummary);
|
||||
info('Summary content:');
|
||||
info(summary);
|
||||
this.writeSummaryFile(summary);
|
||||
await summary_summary.addRaw(summary).write();
|
||||
}
|
||||
else {
|
||||
|
|
@ -59129,7 +59119,6 @@ class TestReporter {
|
|||
});
|
||||
info('Creating annotations');
|
||||
const annotations = getAnnotations(results, this.maxAnnotations);
|
||||
this.writeSummaryFile(summary);
|
||||
const isFailed = this.failOnError && results.some(tr => tr.result === 'failed');
|
||||
const conclusion = isFailed ? 'failure' : 'success';
|
||||
info(`Updating check run conclusion (${conclusion}) and output`);
|
||||
|
|
@ -59152,13 +59141,6 @@ class TestReporter {
|
|||
}
|
||||
return results;
|
||||
}
|
||||
writeSummaryFile(summary) {
|
||||
const dir = process.env.RUNNER_TEMP || (0,external_node_os_namespaceObject.tmpdir)();
|
||||
const file = (0,external_node_path_namespaceObject.join)(dir, `test-reporter-summary-${(0,external_node_crypto_.randomBytes)(8).toString('hex')}.md`);
|
||||
(0,external_node_fs_namespaceObject.writeFileSync)(file, summary);
|
||||
info(`Summary written to ${file}`);
|
||||
setOutput('summary_file', file);
|
||||
}
|
||||
getParser(reporter, options) {
|
||||
switch (reporter) {
|
||||
case 'dart-json':
|
||||
|
|
|
|||
24
package-lock.json
generated
24
package-lock.json
generated
|
|
@ -35,7 +35,7 @@
|
|||
"eslint-plugin-jest": "^29.15.2",
|
||||
"eslint-plugin-prettier": "^5.5.5",
|
||||
"jest": "^30.3.0",
|
||||
"jest-junit": "^17.0.0",
|
||||
"jest-junit": "^16.0.0",
|
||||
"js-yaml": "^4.1.1",
|
||||
"prettier": "^3.8.3",
|
||||
"ts-jest": "^29.4.9",
|
||||
|
|
@ -6110,19 +6110,19 @@
|
|||
}
|
||||
},
|
||||
"node_modules/jest-junit": {
|
||||
"version": "17.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-17.0.0.tgz",
|
||||
"integrity": "sha512-RYWCkq4j59gUXj5DsgbIE7xFBZzu1gtibPhyjSjMmGaOTLnqlXhg7x9zuGCwgbCuMAyoyvk0Mi8wSrRR5uOeLA==",
|
||||
"version": "16.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz",
|
||||
"integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"mkdirp": "^1.0.4",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"uuid": "^14.0.0",
|
||||
"uuid": "^8.3.2",
|
||||
"xml": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
"node": ">=10.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jest-leak-detector": {
|
||||
|
|
@ -8785,17 +8785,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "14.0.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz",
|
||||
"integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==",
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
"https://github.com/sponsors/broofa",
|
||||
"https://github.com/sponsors/ctavan"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "dist-node/bin/uuid"
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/v8-to-istanbul": {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
"eslint-plugin-jest": "^29.15.2",
|
||||
"eslint-plugin-prettier": "^5.5.5",
|
||||
"jest": "^30.3.0",
|
||||
"jest-junit": "^17.0.0",
|
||||
"jest-junit": "^16.0.0",
|
||||
"js-yaml": "^4.1.1",
|
||||
"prettier": "^3.8.3",
|
||||
"ts-jest": "^29.4.9",
|
||||
|
|
|
|||
13
src/main.ts
13
src/main.ts
|
|
@ -2,9 +2,6 @@ import * as core from '@actions/core'
|
|||
import * as github from '@actions/github'
|
||||
import {GitHub} from '@actions/github/lib/utils'
|
||||
import {randomBytes} from 'node:crypto'
|
||||
import {writeFileSync} from 'node:fs'
|
||||
import {tmpdir} from 'node:os'
|
||||
import {join} from 'node:path'
|
||||
|
||||
import {ArtifactProvider} from './input-providers/artifact-provider.js'
|
||||
import {LocalFileProvider} from './input-providers/local-file-provider.js'
|
||||
|
|
@ -224,7 +221,6 @@ class TestReporter {
|
|||
|
||||
core.info('Summary content:')
|
||||
core.info(summary)
|
||||
this.writeSummaryFile(summary)
|
||||
await core.summary.addRaw(summary).write()
|
||||
} else {
|
||||
core.info(`Creating check run ${name}`)
|
||||
|
|
@ -256,7 +252,6 @@ class TestReporter {
|
|||
|
||||
core.info('Creating annotations')
|
||||
const annotations = getAnnotations(results, this.maxAnnotations)
|
||||
this.writeSummaryFile(summary)
|
||||
|
||||
const isFailed = this.failOnError && results.some(tr => tr.result === 'failed')
|
||||
const conclusion = isFailed ? 'failure' : 'success'
|
||||
|
|
@ -283,14 +278,6 @@ class TestReporter {
|
|||
return results
|
||||
}
|
||||
|
||||
writeSummaryFile(summary: string): void {
|
||||
const dir = process.env.RUNNER_TEMP || tmpdir()
|
||||
const file = join(dir, `test-reporter-summary-${randomBytes(8).toString('hex')}.md`)
|
||||
writeFileSync(file, summary)
|
||||
core.info(`Summary written to ${file}`)
|
||||
core.setOutput('summary_file', file)
|
||||
}
|
||||
|
||||
getParser(reporter: string, options: ParseOptions): TestParser {
|
||||
switch (reporter) {
|
||||
case 'dart-json':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue