Skip to content

Commit 510ab91

Browse files
committed
ci: java tests
1 parent c00cd99 commit 510ab91

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

.github/workflows/composite-mex/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ runs:
1111
uses: matlab-actions/run-build@v2
1212
with:
1313
startup-options: ${{ matrix.startup-options }} -logfile ${{ matrix.release }}-${{ runner.os }}-test.log
14-
tasks: ${{ matrix.release < 'R2024b' && !startsWith(matrix.release, 'latest') && 'test_mex test_exe' || 'test:mex test:exe' }}
14+
tasks: ${{ (matrix.release < 'R2024b' && !startsWith(matrix.release, 'latest')) && 'test_mex test_exe' || 'test:mex test:exe' }}

.github/workflows/composite-nomex/action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@ runs:
2222
tasks: test_nomex
2323

2424

25+
- name: Java Test
26+
if: ${{ !contains(matrix.startup-options, '-nojvm') && (matrix.release >= 'R2024b' || startsWith(matrix.release, 'latest')) }}
27+
uses: matlab-actions/run-build@v2
28+
with:
29+
startup-options: ${{ matrix.startup-options }}
30+
tasks: test:java
31+
32+
33+
- name: Java Test (< R2024b)
34+
if: ${{ !contains(matrix.startup-options, '-nojvm') && (matrix.release >= 'R2023b' && matrix.release < 'R2024b' && !startsWith(matrix.release, 'latest')) }}
35+
uses: matlab-actions/run-build@v2
36+
with:
37+
startup-options: ${{ matrix.startup-options }}
38+
tasks: test_java
39+
40+
2541
# note: "source-folder" is necessary, but watch out as it adds all subfolders to path too
2642
# https://github.com/matlab-actions/run-tests?tab=readme-ov-file#run-matlab-tests
2743
- name: Non-mex tests (< R2023b)

buildfile.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
Selector=cjava, ...
6161
TestResults="TestResults_java.xml", Strict=true);
6262

63+
plan("test:hdf4") = matlab.buildtool.tasks.TestTask("test", Tag="hdf4", Strict=true);
64+
plan("test:hdf5") = matlab.buildtool.tasks.TestTask("test", Tag="hdf5", Strict=true);
65+
6366
plan("clean_mex") = matlab.buildtool.Task(Actions=@clean_mex, Description="Clean only MEX files to enable incremental tests");
6467
end
6568

0 commit comments

Comments
 (0)