This commit is contained in:
Pierre Chalamet 2025-10-25 11:54:26 +02:00 committed by GitHub
commit 4dec797f6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 37 additions and 18 deletions

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/dart-json.json](#user-content-r0)|1 ✅|4 ❌|1 ⚪|4s|

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-3%20passed%2C%205%20failed%2C%201%20skipped-critical)
[![Tests failed](https://img.shields.io/badge/tests-3%20passed%2C%205%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/dotnet-nunit.xml](#user-content-r0)|3 ✅|5 ❌|1 ⚪|230ms|

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-5%20passed%2C%205%20failed%2C%201%20skipped-critical)
[![Tests failed](https://img.shields.io/badge/tests-5%20passed%2C%205%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/dotnet-trx.trx](#user-content-r0)|5 ✅|5 ❌|1 ⚪|1s|

View file

@ -1,6 +1,7 @@
![Tests passed successfully](https://img.shields.io/badge/tests-803%20passed%2C%201%20skipped-success)
[![Tests passed successfully](https://img.shields.io/badge/tests-803%20passed%2C%201%20skipped-success)](#user-content-test-report)
<details><summary>Expand for details</summary>
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/external/FluentValidation.Tests.trx](#user-content-r0)|803 ✅||1 ⚪|4s|

View file

@ -1,6 +1,7 @@
![Tests passed successfully](https://img.shields.io/badge/tests-1%20passed-success)
[![Tests passed successfully](https://img.shields.io/badge/tests-1%20passed-success)](#user-content-test-report)
<details><summary>Expand for details</summary>
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/jest-junit-eslint.xml](#user-content-r0)|1 ✅|||0ms|

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/jest-junit.xml](#user-content-r0)|1 ✅|4 ❌|1 ⚪|1s|

View file

@ -1,6 +1,7 @@
![Tests passed successfully](https://img.shields.io/badge/tests-1%20passed-success)
[![Tests passed successfully](https://img.shields.io/badge/tests-1%20passed-success)](#user-content-test-report)
<details><summary>Expand for details</summary>
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/external/jest/jest-react-component-test-results.xml](#user-content-r0)|1 ✅|||1000ms|

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-4207%20passed%2C%202%20failed%2C%2030%20skipped-critical)
[![Tests failed](https://img.shields.io/badge/tests-4207%20passed%2C%202%20failed%2C%2030%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/external/jest/jest-test-results.xml](#user-content-r0)|4207 ✅|2 ❌|30 ⚪|166s|

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/mocha-json.json](#user-content-r0)|1 ✅|4 ❌|1 ⚪|12ms|

View file

@ -1,6 +1,7 @@
![Tests passed successfully](https://img.shields.io/badge/tests-833%20passed%2C%206%20skipped-success)
[![Tests passed successfully](https://img.shields.io/badge/tests-833%20passed%2C%206%20skipped-success)](#user-content-test-report)
<details><summary>Expand for details</summary>
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/external/mocha/mocha-test-results.json](#user-content-r0)|833 ✅||6 ⚪|6s|

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-268%20passed%2C%201%20failed-critical)
[![Tests failed](https://img.shields.io/badge/tests-268%20passed%2C%201%20failed-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/external/flutter/provider-test-results.json](#user-content-r0)|268 ✅|1 ❌||0ms|

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-1%20failed%2C%201%20skipped-critical)
[![Tests failed](https://img.shields.io/badge/tests-1%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/external/java/TEST-org.apache.pulsar.AddMissingPatchVersionTest.xml](#user-content-r0)||1 ❌|1 ⚪|116ms|

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-793%20passed%2C%201%20failed%2C%2014%20skipped-critical)
[![Tests failed](https://img.shields.io/badge/tests-793%20passed%2C%201%20failed%2C%2014%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/external/java/pulsar-test-report.xml](#user-content-r0)|793 ✅|1 ❌|14 ⚪|2127s|

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%201%20failed%2C%201%20skipped-critical)
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%201%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/rspec-json.json](#user-content-r0)|1 ✅|1 ❌|1 ⚪|0ms|

View file

@ -1,6 +1,7 @@
![Tests passed successfully](https://img.shields.io/badge/tests-67%20passed%2C%2012%20skipped-success)
[![Tests passed successfully](https://img.shields.io/badge/tests-67%20passed%2C%2012%20skipped-success)](#user-content-test-report)
<details><summary>Expand for details</summary>
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/external/SilentNotes.trx](#user-content-r0)|67 ✅||12 ⚪|1s|

View file

@ -1,4 +1,5 @@
![Tests failed](https://img.shields.io/badge/tests-2%20passed%2C%201%20failed-critical)
[![Tests failed](https://img.shields.io/badge/tests-2%20passed%2C%201%20failed-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[fixtures/swift-xunit.xml](#user-content-r0)|2 ✅|1 ❌||220ms|

3
dist/index.js generated vendored
View file

@ -2023,7 +2023,7 @@ function getBadge(passed, failed, skipped, options) {
}
const hint = failed > 0 ? 'Tests failed' : 'Tests passed successfully';
const uri = encodeURIComponent(`${options.badgeTitle}-${message}-${color}`);
return `![${hint}](https://img.shields.io/badge/${uri})`;
return `[![${hint}](https://img.shields.io/badge/${uri})](#user-content-test-report)`;
}
function getTestRunsReport(testRuns, options) {
const sections = [];
@ -2032,6 +2032,7 @@ function getTestRunsReport(testRuns, options) {
sections.push(`<details><summary>Expand for details</summary>`);
sections.push(` `);
}
sections.push('# <a name="user-content-test-report"></a> Tests report');
if (testRuns.length > 0 || options.onlySummary) {
const tableData = testRuns
.map((tr, originalIndex) => ({ tr, originalIndex }))

View file

@ -146,7 +146,7 @@ function getBadge(passed: number, failed: number, skipped: number, options: Repo
}
const hint = failed > 0 ? 'Tests failed' : 'Tests passed successfully'
const uri = encodeURIComponent(`${options.badgeTitle}-${message}-${color}`)
return `![${hint}](https://img.shields.io/badge/${uri})`
return `[![${hint}](https://img.shields.io/badge/${uri})](#user-content-test-report)`
}
function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): string[] {
@ -157,6 +157,8 @@ function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): s
sections.push(` `)
}
sections.push('# <a name="user-content-test-report"></a> Tests report')
if (testRuns.length > 0 || options.onlySummary) {
const tableData = testRuns
.map((tr, originalIndex) => ({tr, originalIndex}))