Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Run tInstall on Ubuntu against python versions 3.10, 3.9 and 3.8

name: Test R2022b and R2023a

name: Test R2022b
on:
push:
branches:
- R2022b
- R2023a
- main

pull_request:
branches:
- R2022b

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -20,7 +21,6 @@ jobs:
strategy:
matrix:
python: ["3.10", "3.9", "3.8"]
matlab: [R2022b, R2023a]

runs-on: ubuntu-latest

Expand All @@ -33,7 +33,7 @@ jobs:
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: ${{ matrix.matlab }}
release: R2022b

- uses: actions/checkout@v3

Expand Down
10 changes: 1 addition & 9 deletions test/tInstall.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,12 @@

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

methods (Test)
function installNoVersionSpecified(testCase)
assumeEqual(testCase, testCase.MATLABRelease, 'R2023a')
[status, out] = system("pip install matlabengine");
verifyEqual(testCase, status, 0, out)
verifyInstallation(testCase)
end

function installMatchingEngine(testCase)
[status, out] = system("pip install matlabengine==" + testCase.MATLABVersion + ".*");
addTeardown(testCase, @system, "pip uninstall -y matlabengine")
verifyEqual(testCase, status, 0, out)
verifyInstallation(testCase)
end
Expand All @@ -34,7 +27,6 @@ function verifyInstallation(testCase)
end
pySharedEngineName = string(py.matlab.engine.find_matlab());
verifyEqual(testCase, pySharedEngineName, sharedEngineName)
system("pip uninstall -y matlabengine")
end
end
end
Expand Down