Skip to content

Commit 70945bf

Browse files
committed
Adding code coverage and automatic toolbox versioning
1 parent 832e37b commit 70945bf

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

.github/workflows/matlab-tests.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ jobs:
3131
source-folder: toolbox
3232
code-coverage-cobertura: code-coverage/coverage.xml
3333

34+
- name: Upload coverage to Codecov
35+
uses: codecov/codecov-action@v4
36+
if: always()
37+
with:
38+
files: code-coverage/coverage.xml
39+
fail_ci_if_error: false
40+
3441
package:
3542
name: Package and Release
3643
needs: test
@@ -49,7 +56,14 @@ jobs:
4956
uses: matlab-actions/run-command@v2
5057
with:
5158
command: |
52-
matlab.addons.toolbox.packageToolbox('uihtml-debugger.prj', 'uihtml-debugger.mltbx');
59+
prjFile = 'uihtml-debugger.prj';
60+
tag = getenv('GITHUB_REF_NAME');
61+
if startsWith(tag, 'v')
62+
version = tag(2:end);
63+
fprintf('Updating toolbox version to %s\n', version);
64+
matlab.addons.toolbox.toolboxVersion(prjFile, version);
65+
end
66+
matlab.addons.toolbox.packageToolbox(prjFile, 'uihtml-debugger.mltbx');
5367
5468
- name: Create Release
5569
uses: softprops/action-gh-release@v2
@@ -65,4 +79,4 @@ jobs:
6579
if: github.ref == 'refs/heads/main'
6680
with:
6781
name: uihtml-debugger-mltbx
68-
path: uihtml-debugger.mltbx
82+
path: uihtml-debugger.mltbx

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# UIHTML Debugger for MATLAB
22

3+
[![MATLAB CI](https://github.com/PVDecker1/uihtml-debugger/actions/workflows/matlab-tests.yml/badge.svg)](https://github.com/PVDecker1/uihtml-debugger/actions/workflows/matlab-tests.yml)
4+
[![codecov](https://codecov.io/github/PVDecker1/uihtml-debugger/graph/badge.svg?token=EZZXSUQ4LT)](https://codecov.io/github/PVDecker1/uihtml-debugger)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6+
37
The UIHTML Debugger is a non-intrusive toolkit designed to bridge the gap between MATLAB and JavaScript development. It provides two essential tools to streamline web-based UI development within MATLAB:
48

59
1. **Console Error Rerouter**: Forwards console.log, warn, and error messages directly to the MATLAB Command Window.

0 commit comments

Comments
 (0)