11name : Build and Test
22on : [push]
3+ permissions :
4+ contents : read
35
46jobs :
57 bat :
68 name : Build and Test
79 runs-on : ubuntu-latest
810 steps :
9- - uses : actions/checkout@v4
10- - uses : actions/setup-node@v4
11+ - uses : actions/checkout@v5
12+ - uses : actions/setup-node@v5
1113 with :
1214 node-version : 20
1315 - name : Perform npm tasks
1416 run : npm run ci
15-
17+ - uses : actions/upload-artifact@v4
18+ with :
19+ name : built-action
20+ path : |
21+ **/*
22+ !node_modules/
23+ integ :
24+ needs : bat
25+ runs-on : ${{ matrix.os }}
26+ strategy :
27+ fail-fast : false
28+ matrix :
29+ os : [ubuntu-latest, windows-latest, macos-latest, macos-14]
30+ steps :
31+ - uses : actions/download-artifact@v5
32+ with :
33+ name : built-action
1634 - name : Perform 'setup-matlab'
1735 uses : matlab-actions/setup-matlab@v2
18-
1936 - name : Greet the world in style
2037 uses : ./
2138 with :
2239 command : " disp('hello world');"
23-
2440 - name : Run MATLAB statement
2541 uses : ./
2642 with :
2743 command : f = fopen('myscript.m', 'w'); fwrite(f, 'assert(true)'); fclose(f);
28-
2944 - name : Run MATLAB script
3045 uses : ./
3146 with :
3247 command : myscript
33-
3448 - name : Run MATLAB statement with quotes 1
3549 uses : ./
3650 with :
3751 command : " eval(\" a = 1+2\" ), assert(a == 3); eval('b = 3+4'), assert(b == 7);"
38-
3952 - name : Run MATLAB statement with quotes 2
4053 uses : ./
4154 with :
4255 command : ' eval("a = 1+2"), assert(a == 3); eval('' b = 3+4'' ), assert(b == 7);'
43-
4456 - name : Run MATLAB statement with quotes 3
4557 uses : ./
4658 with :
4759 command : a = """hello world""", b = '"hello world"', assert(strcmp(a,b));
48-
4960 - name : Run MATLAB statement with symbols
5061 uses : ./
5162 with :
5263 command : a = " !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~", b = char([32:126]), assert(strcmp(a, b), a+b);
53-
5464 - name : Run MATLAB statement in working directory
5565 uses : ./
5666 with :
5767 command : exp = getenv('GITHUB_WORKSPACE'), act = pwd, assert(strcmp(act, exp), strjoin({act exp}, '\n'));
58-
5968 - name : Run MATLAB statement with arguments
6069 uses : ./
6170 with :
6271 command : disp("Hello world!!")
6372 startup-options : -nojvm -nodesktop -logfile mylog.log
64-
6573 - name : Validate that previous command ran with arguments
6674 uses : ./
6775 with :
6876 command : assert(isfile("mylog.log"));
69-
7077 - run : echo 'onetyone = 11' > startup.m
7178 shell : bash
72-
7379 - name : MATLAB runs startup.m automatically
7480 uses : ./
7581 with :
7682 command : assert(onetyone==11, 'the variable `onetyone` was not set as expected by startup.m')
77-
7883 - run : |
7984 mkdir subdir
8085 echo 'onetyonetyone = 111' > subdir/startup.m
8186 shell: bash
82-
8387 - name : MATLAB sd startup option is not overwritten
8488 uses : ./
8589 with :
@@ -88,17 +92,14 @@ jobs:
8892 [~, f] = fileparts(pwd);
8993 assert(strcmp(f, 'subdir'));
9094 startup-options : -sd subdir
91-
9295 - name : Verify environment variables make it to MATLAB
9396 uses : ./
9497 with :
9598 command : exp = 'my_value', act = getenv('MY_VAR'), assert(strcmp(act, exp), strjoin({act exp}, '\n'));
9699 env :
97100 MY_VAR : my_value
98-
99101 # Remove when online batch licensing is the default
100102 - name : Verify MW_BATCH_LICENSING_ONLINE variable set
101103 uses : ./
102104 with :
103105 command : exp = 'true', act = getenv('MW_BATCH_LICENSING_ONLINE'), assert(strcmp(act, exp), strjoin({act exp}, '\n'));
104-
0 commit comments