Skip to content

Commit d5b3c89

Browse files
authored
Test only R2022b in R2022b branch (#24)
* Test only R2022b in R2022b branch * Uninstall matlabengine in teardown
1 parent d281288 commit d5b3c89

2 files changed

Lines changed: 7 additions & 15 deletions

File tree

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Run tInstall on Ubuntu against python versions 3.10, 3.9 and 3.8
22

3-
name: Test R2022b and R2023a
4-
3+
name: Test R2022b
54
on:
65
push:
76
branches:
87
- R2022b
9-
- R2023a
10-
- main
8+
9+
pull_request:
10+
branches:
11+
- R2022b
1112

1213
# Allows you to run this workflow manually from the Actions tab
1314
workflow_dispatch:
@@ -20,7 +21,6 @@ jobs:
2021
strategy:
2122
matrix:
2223
python: ["3.10", "3.9", "3.8"]
23-
matlab: [R2022b, R2023a]
2424

2525
runs-on: ubuntu-latest
2626

@@ -33,7 +33,7 @@ jobs:
3333
- name: Set up MATLAB
3434
uses: matlab-actions/setup-matlab@v1
3535
with:
36-
release: ${{ matrix.matlab }}
36+
release: R2022b
3737

3838
- uses: actions/checkout@v3
3939

test/tInstall.m

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,12 @@
55

66
properties (Constant)
77
MATLABVersion = string(ver('MATLAB').Version) % Example: 9.14
8-
MATLABRelease = erase(ver('MATLAB').Release,{'(',')'}) % Example: (R2023a) -> R2023a
98
end
109

1110
methods (Test)
12-
function installNoVersionSpecified(testCase)
13-
assumeEqual(testCase, testCase.MATLABRelease, 'R2023a')
14-
[status, out] = system("pip install matlabengine");
15-
verifyEqual(testCase, status, 0, out)
16-
verifyInstallation(testCase)
17-
end
18-
1911
function installMatchingEngine(testCase)
2012
[status, out] = system("pip install matlabengine==" + testCase.MATLABVersion + ".*");
13+
addTeardown(testCase, @system, "pip uninstall -y matlabengine")
2114
verifyEqual(testCase, status, 0, out)
2215
verifyInstallation(testCase)
2316
end
@@ -34,7 +27,6 @@ function verifyInstallation(testCase)
3427
end
3528
pySharedEngineName = string(py.matlab.engine.find_matlab());
3629
verifyEqual(testCase, pySharedEngineName, sharedEngineName)
37-
system("pip uninstall -y matlabengine")
3830
end
3931
end
4032
end

0 commit comments

Comments
 (0)