@@ -38,91 +38,91 @@ jobs:
3838 - name : run tests
3939 uses : ./
4040 with :
41- command : ' runtests("sample\ TheTruth.m"); runtests("sample\ TheTruth.m");'
42- - name : Greet the world in style
43- uses : ./
44- with :
45- command : " disp('hello world');"
46- - name : Run MATLAB statement
47- uses : ./
48- with :
49- command : f = fopen('myscript.m', 'w'); fwrite(f, 'assert(true)'); fclose(f);
50- - name : Run MATLAB script
51- uses : ./
52- with :
53- command : myscript
54- - name : Run MATLAB statement with quotes 1
55- uses : ./
56- with :
57- command : ' eval("a = 1+2"), assert(a == 3); eval('' b = 3+4'' ), assert(b == 7);'
58- - name : Run MATLAB statement with quotes 2
59- uses : ./
60- with :
61- command : ' eval("a = 1+2"), assert(a == 3); eval('' b = 3+4'' ), assert(b == 7);'
62- - name : Run MATLAB statement with quotes 3
63- uses : ./
64- with :
65- command : a = """hello world""", b = '"hello world"', assert(strcmp(a,b));
66- - name : Run MATLAB statement with symbols
67- uses : ./
68- with :
69- command : a = " !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~", b = char([32:126]), assert(strcmp(a, b), a+b);
70- - name : Run MATLAB statement in working directory
71- uses : ./
72- with :
73- command : exp = getenv('GITHUB_WORKSPACE'), act = pwd, assert(strcmp(act, exp), strjoin({act exp}, '\n'));
74- - name : Run MATLAB statement with arguments
75- uses : ./
76- with :
77- command : disp("Hello world!!")
78- startup-options : -nojvm -nodesktop -logfile mylog.log
79- - name : Validate that previous command ran with arguments
80- uses : ./
81- with :
82- command : assert(isfile("mylog.log"));
83- - run : echo 'onetyone = 11' > startup.m
84- shell : bash
85- - name : MATLAB runs startup.m automatically
86- uses : ./
87- with :
88- command : assert(onetyone==11, 'the variable `onetyone` was not set as expected by startup.m')
89- - run : |
90- mkdir subdir
91- echo 'onetyonetyone = 111' > subdir/startup.m
92- shell: bash
93- - name : MATLAB sd startup option is not overwritten
94- uses : ./
95- with :
96- command : >
97- assert(onetyonetyone==111);
98- [~, f] = fileparts(pwd);
99- assert(strcmp(f, 'subdir'));
100- startup-options : -sd subdir
101- - name : Create buildfile.m in project root for build and test summary
102- shell : bash
103- run : |
104- cat <<'_EOF' >> "buildfile.m"
105- function plan = buildfile
106- import matlab.buildtool.tasks.TestTask
41+ command : ' runtests("sample/ TheTruth.m"); runtests("sample/ TheTruth.m");'
42+ # - name: Greet the world in style
43+ # uses: ./
44+ # with:
45+ # command: "disp('hello world');"
46+ # - name: Run MATLAB statement
47+ # uses: ./
48+ # with:
49+ # command: f = fopen('myscript.m', 'w'); fwrite(f, 'assert(true)'); fclose(f);
50+ # - name: Run MATLAB script
51+ # uses: ./
52+ # with:
53+ # command: myscript
54+ # - name: Run MATLAB statement with quotes 1
55+ # uses: ./
56+ # with:
57+ # command: 'eval("a = 1+2"), assert(a == 3); eval(''b = 3+4''), assert(b == 7);'
58+ # - name: Run MATLAB statement with quotes 2
59+ # uses: ./
60+ # with:
61+ # command: 'eval("a = 1+2"), assert(a == 3); eval(''b = 3+4''), assert(b == 7);'
62+ # - name: Run MATLAB statement with quotes 3
63+ # uses: ./
64+ # with:
65+ # command: a = """hello world""", b = '"hello world"', assert(strcmp(a,b));
66+ # - name: Run MATLAB statement with symbols
67+ # uses: ./
68+ # with:
69+ # command: a = " !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~", b = char([32:126]), assert(strcmp(a, b), a+b);
70+ # - name: Run MATLAB statement in working directory
71+ # uses: ./
72+ # with:
73+ # command: exp = getenv('GITHUB_WORKSPACE'), act = pwd, assert(strcmp(act, exp), strjoin({act exp}, '\n'));
74+ # - name: Run MATLAB statement with arguments
75+ # uses: ./
76+ # with:
77+ # command: disp("Hello world!!")
78+ # startup-options: -nojvm -nodesktop -logfile mylog.log
79+ # - name: Validate that previous command ran with arguments
80+ # uses: ./
81+ # with:
82+ # command: assert(isfile("mylog.log"));
83+ # - run: echo 'onetyone = 11' > startup.m
84+ # shell: bash
85+ # - name: MATLAB runs startup.m automatically
86+ # uses: ./
87+ # with:
88+ # command: assert(onetyone==11, 'the variable `onetyone` was not set as expected by startup.m')
89+ # - run: |
90+ # mkdir subdir
91+ # echo 'onetyonetyone = 111' > subdir/startup.m
92+ # shell: bash
93+ # - name: MATLAB sd startup option is not overwritten
94+ # uses: ./
95+ # with:
96+ # command: >
97+ # assert(onetyonetyone==111);
98+ # [~, f] = fileparts(pwd);
99+ # assert(strcmp(f, 'subdir'));
100+ # startup-options: -sd subdir
101+ # - name: Create buildfile.m in project root for build and test summary
102+ # shell: bash
103+ # run: |
104+ # cat <<'_EOF' >> "buildfile.m"
105+ # function plan = buildfile
106+ # import matlab.buildtool.tasks.TestTask
107107
108- plan = buildplan(localfunctions);
109- plan("preMadeTest") = TestTask;
108+ # plan = buildplan(localfunctions);
109+ # plan("preMadeTest") = TestTask;
110110
111- plan.DefaultTasks = "preMadeTest";
112- end
113- _EOF
114- - name : Run command with buildtool pre-made test task
115- uses : ./
116- with :
117- command : buildtool preMadeTest
118- - name : Verify environment variables make it to MATLAB
119- uses : ./
120- with :
121- command : exp = 'my_value', act = getenv('MY_VAR'), assert(strcmp(act, exp), strjoin({act exp}, '\n'));
122- env :
123- MY_VAR : my_value
124- # Remove when online batch licensing is the default
125- - name : Verify MW_BATCH_LICENSING_ONLINE variable set
126- uses : ./
127- with :
128- command : exp = 'true', act = getenv('MW_BATCH_LICENSING_ONLINE'), assert(strcmp(act, exp), strjoin({act exp}, '\n'));
111+ # plan.DefaultTasks = "preMadeTest";
112+ # end
113+ # _EOF
114+ # - name: Run command with buildtool pre-made test task
115+ # uses: ./
116+ # with:
117+ # command: buildtool preMadeTest
118+ # - name: Verify environment variables make it to MATLAB
119+ # uses: ./
120+ # with:
121+ # command: exp = 'my_value', act = getenv('MY_VAR'), assert(strcmp(act, exp), strjoin({act exp}, '\n'));
122+ # env:
123+ # MY_VAR: my_value
124+ # # Remove when online batch licensing is the default
125+ # - name: Verify MW_BATCH_LICENSING_ONLINE variable set
126+ # uses: ./
127+ # with:
128+ # command: exp = 'true', act = getenv('MW_BATCH_LICENSING_ONLINE'), assert(strcmp(act, exp), strjoin({act exp}, '\n'));
0 commit comments