Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/bat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
plan = buildplan(localfunctions);
plan("preMadeTest") = TestTask;
plan("preMadeTest").Dependencies = "build";
plan("preMadeTest_1") = TestTask;
plan("preMadeTest_1").Dependencies = "build";
plan("preMadeTest_2") = TestTask;
plan("preMadeTest_2").Dependencies = "build";
plan("test").Dependencies = "build";
plan("deploy").Dependencies = "test";

Expand Down Expand Up @@ -230,6 +234,11 @@ jobs:
with:
tasks: preMadeTest

- name: Run build with premade TestTask ran multiple times for test summary sanity
uses: ./
with:
tasks: preMadeTest preMadeTest_1 preMadeTest_2

- name: Run build with invalid task
continue-on-error: true
uses: ./
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ inputs:
Startup options for MATLAB
required: false
default: ""
generate-summary:
description: >-
Option to generate a summary for the GitHub job summary
required: false
default: true
runs:
using: node24
main: dist/index.js
54 changes: 27 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@actions/core": "^3.0.0",
"@actions/exec": "^3.0.0",
"common-utils": "github:matlab-actions/common-utils#v2.2.2"
"common-utils": "github:matlab-actions/common-utils#v2.3.0"
},
"devDependencies": {
"@types/jest": "^30.0.0",
Expand Down
22 changes: 16 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ async function run() {

const command = buildtool.generateCommand(options);
const startupOptions = core.getInput("startup-options").split(" ");
const generateSummary = core.getBooleanInput("generate-summary");

const helperScript = await matlab.generateScript(workspaceDir, command);
const execOptions = {
env: {
...process.env,
MW_BATCH_LICENSING_ONLINE: "true", // Remove when online batch licensing is the default
MW_MATLAB_BUILDTOOL_DEFAULT_PLUGINS_FCN_OVERRIDE: "buildframework.getDefaultPlugins",
MW_GENERATE_SUMMARY: String(generateSummary),
Comment thread
mw-kapilg marked this conversation as resolved.
Outdated
},
};

Expand All @@ -39,12 +41,20 @@ async function run() {
startupOptions,
)
.finally(() => {
const runnerTemp = process.env.RUNNER_TEMP || "";
const runId = process.env.GITHUB_RUN_ID || "";

buildSummary.processAndAddBuildSummary(runnerTemp, runId);
testResultsSummary.processAndAddTestSummary(runnerTemp, runId, workspaceDir);
core.summary.write();
if (generateSummary) {
const runnerTemp = process.env.RUNNER_TEMP || "";
const runId = process.env.GITHUB_RUN_ID || "";
const actionName = process.env.GITHUB_ACTION || "";

buildSummary.processAndAddBuildSummary(runnerTemp, actionName);
testResultsSummary.processAndAddTestSummary(
runnerTemp,
runId,
actionName,
workspaceDir,
);
core.summary.write();
}
});
}

Expand Down
Loading