Skip to content

Commit ea8653b

Browse files
authored
Update tests with buildtool and buildfile.m (#18)
* Use buildtools in Battery High Voltage component * Update buildfile.m at the project root. * Add buildtool-results folder to the project. * Update .github/workflow/ci.yml file.
1 parent 9d3320b commit ea8653b

File tree

1,737 files changed

+28548
-17711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,737 files changed

+28548
-17711
lines changed

.gitattributes

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
# Git Attributes File
2-
# Use this as .gitattributes file.
3-
#
4-
# Copyright 2020 The MathWorks, Inc.
5-
6-
*.jpg -crlf -diff -merge
7-
*.png -crlf -diff -merge
8-
9-
*.pdf -crlf -diff -merge
10-
11-
*.docx -crlf -diff -merge
12-
*.pptx -crlf -diff -merge
13-
*.xlsx -crlf -diff -merge
14-
15-
# === For use with MathWorks tools ===
16-
# For details, see the MATLAB Documentation "Set Up Git Source Control".
17-
18-
# Tip*
19-
#
20-
# You can reduce your Git repository size by saving Simulink models in SLX
21-
# format **without** compression. Turning off compression results in larger SLX
22-
# files on disk but reduces repository size.
23-
#
24-
# To turn off SLX compression, open your Simulink SLX file. In the Toolstrip,
25-
# select Modeling tab. In the Design section, select Property Inspector. In the
26-
# Property Inspector, select Properties tab. In the General group, at SLX
27-
# Compression, select "None".
28-
#
29-
# (*based on the Simulink Documentation "Manage Model Versions and Specify Model
30-
# Properties")
31-
32-
# MATLAB binary files
33-
*.fig -crlf -diff -merge
34-
*.mat -crlf -diff -merge
35-
*.mdl -crlf -diff -merge
36-
*.mdlp -crlf -diff -merge
37-
*.mexa64 -crlf -diff -merge
38-
*.mexmaci64 -crlf -diff -merge
39-
*.mexw64 -crlf -diff -merge
40-
*.mlapp -crlf -diff -merge
41-
*.mldatx -crlf -diff -merge
42-
*.mlproj -crlf -diff -merge
43-
*.mlx -crlf -diff -merge
44-
*.p -crlf -diff -merge
45-
*.sfx -crlf -diff -merge
46-
*.sldd -crlf -diff -merge
47-
*.slreqx -crlf -diff -merge
48-
*.sltx -crlf -diff -merge
49-
*.slx -crlf -diff -merge
50-
*.slxc -crlf -diff -merge
51-
*.slxp -crlf -diff -merge
1+
# Git Attributes File
2+
# Use this as .gitattributes file.
3+
#
4+
# Copyright 2020 The MathWorks, Inc.
5+
6+
*.jpg -crlf -diff -merge
7+
*.png -crlf -diff -merge
8+
9+
*.pdf -crlf -diff -merge
10+
11+
*.docx -crlf -diff -merge
12+
*.pptx -crlf -diff -merge
13+
*.xlsx -crlf -diff -merge
14+
15+
# === For use with MathWorks tools ===
16+
# For details, see the MATLAB Documentation "Set Up Git Source Control".
17+
18+
# Tip*
19+
#
20+
# You can reduce your Git repository size by saving Simulink models in SLX
21+
# format **without** compression. Turning off compression results in larger SLX
22+
# files on disk but reduces repository size.
23+
#
24+
# To turn off SLX compression, open your Simulink SLX file. In the Toolstrip,
25+
# select Modeling tab. In the Design section, select Property Inspector. In the
26+
# Property Inspector, select Properties tab. In the General group, at SLX
27+
# Compression, select "None".
28+
#
29+
# (*based on the Simulink Documentation "Manage Model Versions and Specify Model
30+
# Properties")
31+
32+
# MATLAB binary files
33+
*.fig -crlf -diff -merge
34+
*.mat -crlf -diff -merge
35+
*.mdl -crlf -diff -merge
36+
*.mdlp -crlf -diff -merge
37+
*.mexa64 -crlf -diff -merge
38+
*.mexmaci64 -crlf -diff -merge
39+
*.mexw64 -crlf -diff -merge
40+
*.mlapp -crlf -diff -merge
41+
*.mldatx -crlf -diff -merge
42+
*.mlproj -crlf -diff -merge
43+
*.mlx -crlf -diff -merge
44+
*.p -crlf -diff -merge
45+
*.sfx -crlf -diff -merge
46+
*.sldd -crlf -diff -merge
47+
*.slreqx -crlf -diff -merge
48+
*.sltx -crlf -diff -merge
49+
*.slx -crlf -diff -merge
50+
*.slxc -crlf -diff -merge
51+
*.slxp -crlf -diff -merge

.github/workflows/ci.yml

Lines changed: 115 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,115 @@
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: [ R2023b ]
19-
paths-ignore:
20-
- 'docs/**'
21-
- '**.md'
22-
- '**.png'
23-
- '**.svg'
24-
- '**.txt'
25-
- '**.xml'
26-
27-
pull_request:
28-
branches: [ R2023b ]
29-
paths-ignore:
30-
- 'docs/**'
31-
- '**.md'
32-
- '**.png'
33-
- '**.svg'
34-
- '**.txt'
35-
- '**.xml'
36-
37-
schedule:
38-
- cron: '55/61 20/25 1/6 * *' # schedule a weekly-ish build
39-
40-
workflow_dispatch:
41-
42-
jobs:
43-
44-
job-build-project:
45-
runs-on: ubuntu-latest
46-
permissions:
47-
# required for sarif upload
48-
security-events: write
49-
checks: write # required for junit test result publishing
50-
51-
steps:
52-
53-
- name: Check out repository
54-
uses: actions/checkout@v3
55-
56-
- name: Setup MATLAB
57-
uses: matlab-actions/setup-matlab@v2-beta
58-
with:
59-
release: R2023b
60-
cache: true
61-
products: |
62-
Simulink
63-
Simscape
64-
Simscape_Electrical
65-
Simscape_Driveline
66-
Powertrain_Blockset
67-
68-
- name: Start display server
69-
run: |
70-
sudo apt-get install xvfb
71-
Xvfb :99 &
72-
echo "DISPLAY=:99" >> $GITHUB_ENV
73-
74-
- name: Run project checks, lint, and tests
75-
uses: matlab-actions/run-build@v1
76-
continue-on-error: true
77-
78-
- name: Upload SARIF file
79-
uses: github/codeql-action/upload-sarif@v2
80-
if: always()
81-
with:
82-
sarif_file: results/issues.sarif
83-
category: matlab-analysis
84-
85-
- name: Publish Test Report
86-
uses: mikepenz/action-junit-report@v4
87-
if: always()
88-
with:
89-
report_paths: 'results/test-results.xml'
90-
91-
- name: Upload Test Report
92-
if: always()
93-
uses: actions/upload-artifact@v2
94-
with:
95-
name: Test Results
96-
path: results/test-results.pdf
97-
98-
- name: Upload All Artifacts
99-
if: always()
100-
uses: actions/upload-artifact@v2
101-
with:
102-
name: All Artifacts
103-
path: results
104-
105-
- name: Publish coverage
106-
uses: 5monkeys/cobertura-action@master
107-
continue-on-error: true
108-
with:
109-
path: results/coverage.xml
110-
minimum_coverage: 75
111-
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: [ R2023b ]
19+
paths-ignore:
20+
- 'docs/**'
21+
- '**.md'
22+
- '**.png'
23+
- '**.svg'
24+
- '**.txt'
25+
- '**.xml'
26+
27+
pull_request:
28+
branches: [ R2023b ]
29+
paths-ignore:
30+
- 'docs/**'
31+
- '**.md'
32+
- '**.png'
33+
- '**.svg'
34+
- '**.txt'
35+
- '**.xml'
36+
37+
schedule:
38+
- cron: '55/61 20/25 1/6 * *' # schedule a weekly-ish build
39+
40+
workflow_dispatch:
41+
42+
jobs:
43+
44+
job-buildtool-23b:
45+
46+
name: Test in R2023b
47+
48+
runs-on: ubuntu-latest
49+
50+
permissions:
51+
# required for sarif upload
52+
security-events: write
53+
checks: write # required for junit test result publishing
54+
55+
steps:
56+
57+
- name: Check out repository
58+
uses: actions/checkout@v3
59+
60+
- name: Setup MATLAB
61+
uses: matlab-actions/setup-matlab@v2-beta
62+
with:
63+
release: R2023b
64+
cache: true
65+
products: |
66+
Simulink
67+
Simscape
68+
Simscape_Electrical
69+
Simscape_Driveline
70+
Powertrain_Blockset
71+
72+
- name: Start display server
73+
run: |
74+
sudo apt-get install xvfb
75+
Xvfb :99 &
76+
echo "DISPLAY=:99" >> $GITHUB_ENV
77+
78+
- name: Run buildtool using buildfile.m
79+
uses: matlab-actions/run-command@v1
80+
with:
81+
command: openProject(pwd); buildtool Test
82+
83+
- name: Upload SARIF file
84+
uses: github/codeql-action/upload-sarif@v2
85+
if: always()
86+
with:
87+
sarif_file: cache/buildtool-results/code-issues.sarif
88+
category: matlab-analysis
89+
90+
- name: Publish Test Report
91+
uses: mikepenz/action-junit-report@v4
92+
if: always()
93+
with:
94+
report_paths: 'cache/buildtool-results/test-results.xml'
95+
96+
- name: Upload Test Report
97+
if: always()
98+
uses: actions/upload-artifact@v2
99+
with:
100+
name: Test Results
101+
path: cache/buildtool-results/test-results.pdf
102+
103+
- name: Upload All Artifacts
104+
if: always()
105+
uses: actions/upload-artifact@v2
106+
with:
107+
name: All Artifacts
108+
path: cache/buildtool-results
109+
110+
- name: Publish coverage
111+
uses: 5monkeys/cobertura-action@master
112+
continue-on-error: true
113+
with:
114+
path: cache/buildtool-results/code-coverage.xml
115+
minimum_coverage: 75

.github/workflows/jupyter.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)