Skip to content

Commit 56c5430

Browse files
committed
Update GitHub Actions config files.
1 parent d8e7667 commit 56c5430

36 files changed

+99
-11
lines changed

.github/workflows/check-MATLAB-project.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ on:
88
push:
99
branches:
1010
- 'R2022b'
11+
paths-ignore:
12+
- 'docs/**'
13+
- '**.md'
14+
- '**.png'
15+
- '**.svg'
16+
- '**.txt'
17+
- '**.xml'
1118

1219
jobs:
1320
matlab-project-check-22a:
@@ -25,4 +32,4 @@ jobs:
2532
- name: Run tests
2633
uses: matlab-actions/run-command@v1
2734
with:
28-
command: openProject(pwd); HEVProject_check_project;
35+
command: openProject(pwd); HEVProject_runtests_CheckProject;
3.87 KB
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
classdef HEVProject_UnitTest_CheckProject < matlab.unittest.TestCase
2+
% Class implementation of unit test
3+
4+
% Copyright 2023 The MathWorks, Inc.
5+
6+
methods (Test)
7+
8+
function CheckProject(~)
9+
close all
10+
bdclose all
11+
HEVProject_CheckProject
12+
close all
13+
bdclose all
14+
end
15+
16+
end % methods (Test)
17+
end % classdef
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
%% Run unit tests
2+
% This script runs unit tests and generates a test result summary in XML
3+
% and a MATLAB code coverage report in HTML.
4+
5+
% Copyright 2022 The MathWorks, Inc.
6+
7+
RelStr = matlabRelease().Release;
8+
disp("This is MATLAB " + RelStr + ".")
9+
10+
TopFolder = currentProject().RootFolder;
11+
12+
%% Test suite
13+
14+
suite = matlab.unittest.TestSuite.fromFile( ...
15+
fullfile(TopFolder, "Test", "CheckProject", "HEVProject_UnitTest_CheckProject.m"));
16+
17+
%% Test runner
18+
19+
runner = matlab.unittest.TestRunner.withTextOutput( ...
20+
OutputDetail = matlab.unittest.Verbosity.Detailed );
21+
22+
%% JUnit Style Test Result
23+
24+
% Test result file is created. Don't check its existance.
25+
TestResultFile = "TestResults_" + RelStr + ".xml";
26+
27+
plugin = matlab.unittest.plugins.XMLPlugin.producingJUnitFormat( ...
28+
fullfile(TopFolder, "Test", "CheckProject", TestResultFile));
29+
30+
addPlugin(runner, plugin)
31+
32+
%%
33+
34+
results = run(runner, suite);
35+
36+
assertSuccess(results)
File renamed without changes.
File renamed without changes.
File renamed without changes.

resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/dgnQYbKo9QhpBAmKIMeooB6Oa4Qp.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version='1.0' encoding='UTF-8'?>
2-
<Info Ref="test" Type="Relative" />
2+
<Info Ref="Test" Type="Relative"/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Info location="09118749-6020-4015-94ef-415654971479" type="Reference"/>

0 commit comments

Comments
 (0)