Skip to content

Commit 9efca69

Browse files
committed
add grouping
1 parent c7abd6b commit 9efca69

4 files changed

Lines changed: 25 additions & 11 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
classdef GitHubLogPlugin < matlab.unittest.plugins.TestRunnerPlugin
2+
% Copyright 2025 The MathWorks, Inc.
3+
4+
methods (Access=protected)
5+
function runTest(plugin, pluginData)
6+
% Add GitHub workflow command for starting a test output group
7+
disp("::group::" + pluginData.TestSuite.Name);
8+
9+
% Invoke the superclass method
10+
runTest@matlab.unittest.plugins.TestRunnerPlugin(plugin, pluginData);
11+
12+
% End the test output group
13+
disp("::endgroup::");
14+
end
15+
end
16+
end
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
classdef GitHubLogPluginService < matlab.buildtool.internal.services.ciplugins.CITestRunnerPluginService
2+
% Copyright 2025 The MathWorks, Inc.
3+
4+
methods
5+
function plugins = providePlugins(~, ~)
6+
plugins = ciplugins.github.GitHubLogPlugin();
7+
end
8+
end
9+
end

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ async function run() {
3333
// const command = scriptgen.generateCommand(options);
3434
const pluginsPath = path.join(__dirname, "plugins").replace("'","''");
3535
const command = "addpath('"+ pluginsPath +"');" + "import matlab.unittest.TestRunner; addpath(genpath('sample')); suite = testsuite(pwd, 'IncludeSubfolders', true); runner = TestRunner.withDefaultPlugins(); results = runner.run(suite); results = runner.run(suite); display(results); assertSuccess(results);";
36-
// core.summary.addRaw(command, true);
3736
const startupOptions = core.getInput("startup-options").split(" ");
3837

3938
const helperScript = await core.group("Generate script", async () => {

src/testResultsSummary.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ import { readFileSync, unlinkSync, existsSync } from 'fs';
33
import * as path from 'path';
44
import * as core from "@actions/core";
55

6-
// doesn't have id
7-
// check with multiple runs in same step (what happens to duration?)
8-
96
export enum MatlabTestStatus {
107
PASSED = 'PASSED',
118
FAILED = 'FAILED',
@@ -135,13 +132,6 @@ function generateTestCaseRow(testCase: MatlabTestCase): string {
135132
`</tr>`;
136133
}
137134

138-
// Replace characters for HTML display
139-
// function formatDiagnosticReport(report: string): string {
140-
// return report
141-
// .replace(/\n/g, '<br>')
142-
// .trim();
143-
// }
144-
145135
function getStatusEmoji(status: MatlabTestStatus): string {
146136
switch (status) {
147137
case MatlabTestStatus.PASSED: return '✅';

0 commit comments

Comments
 (0)