Skip to content

Commit 5d5ff4a

Browse files
committed
Commit for R2023a with Github Actions
1 parent 0f5c24b commit 5d5ff4a

File tree

12 files changed

+109
-2
lines changed

12 files changed

+109
-2
lines changed

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# GitHub Actions Workflow with MATLAB Actions
2+
#
3+
# For a general overview of GitHub Actions, see
4+
# https://docs.github.com/en/actions
5+
#
6+
# For using MathWorks products in GitHub Actions, see
7+
# https://github.com/matlab-actions/overview
8+
#
9+
# For details about the syntax of this file, see
10+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
11+
12+
# Copyright 2021-2023 The MathWorks, Inc.
13+
14+
name: CI using MATLAB
15+
16+
on:
17+
push:
18+
branches: [ master ]
19+
paths-ignore:
20+
- 'docs/**'
21+
- '**.md'
22+
- '**.png'
23+
- '**.svg'
24+
- '**.txt'
25+
- '**.xml'
26+
27+
pull_request:
28+
branches: [ master ]
29+
paths-ignore:
30+
- 'docs/**'
31+
- '**.md'
32+
- '**.png'
33+
- '**.svg'
34+
- '**.txt'
35+
- '**.xml'
36+
37+
jobs:
38+
39+
job-check-project:
40+
runs-on: ubuntu-latest
41+
steps:
42+
43+
- name: Check out repository
44+
uses: actions/checkout@v3
45+
46+
- name: Setup MATLAB
47+
uses: matlab-actions/setup-matlab@v1
48+
with:
49+
release: R2023a
50+
51+
- name: Run tests
52+
uses: matlab-actions/run-command@v1
53+
with:
54+
command: openProject(pwd); BEVProject_runtests_CheckProject;
55+
56+
job-run-tests:
57+
58+
# This job starts only if the previous job is successful.
59+
needs: job-check-project
60+
61+
runs-on: ubuntu-latest
62+
steps:
63+
64+
- name: Check out repository
65+
uses: actions/checkout@v3
66+
67+
- name: Setup MATLAB
68+
uses: matlab-actions/setup-matlab@v1
69+
with:
70+
release: R2023a
71+
72+
- name: Run tests
73+
uses: matlab-actions/run-command@v1
74+
with:
75+
command: openProject(pwd); BEVProject_Tests;

Test/BEVProject_Tests.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
prjRoot = currentProject().RootFolder;
1515

1616
suite_1 = matlab.unittest.TestSuite.fromFolder( ...
17-
fullfile(prjRoot, "Components\BatteryHV"), IncludingSubfolders = true);
17+
fullfile(prjRoot, "Components","BatteryHV"), IncludingSubfolders = true);
1818

1919
suite_2 = matlab.unittest.TestSuite.fromFile( ...
2020
fullfile(prjRoot, "Test", "BEV_System_UnitTest_MQC.m"));
2121

2222
suite_3 = matlab.unittest.TestSuite.fromFolder( ...
23-
fullfile(prjRoot, "Components\MotorDrive"), IncludingSubfolders = true);
23+
fullfile(prjRoot, "Components","MotorDrive"), IncludingSubfolders = true);
2424

2525

2626

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/>
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="1" type="DIR_SIGNIFIER"/>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Info>
3+
<Category UUID="FileClassCategory">
4+
<Label UUID="7d2f3aeb-7c63-4ab3-935b-ad0e0b73334f"/>
5+
</Category>
6+
</Info>
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="workflows" type="File"/>
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/>
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="1" type="DIR_SIGNIFIER"/>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Info>
3+
<Category UUID="FileClassCategory">
4+
<Label UUID="7d2f3aeb-7c63-4ab3-935b-ad0e0b73334f"/>
5+
</Category>
6+
</Info>
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="ci.yml" type="File"/>

0 commit comments

Comments
 (0)