Skip to content

Commit 80ccbef

Browse files
committed
Add test to verify env vars are properly set
1 parent b06a8be commit 80ccbef

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/bat.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,19 @@ jobs:
8888
[~, f] = fileparts(pwd);
8989
assert(strcmp(f, 'subdir'));
9090
startup-options: -sd subdir
91+
92+
- name: Verify environment variables make it to MATLAB
93+
uses: ./
94+
with:
95+
command: exp = 'my_value', act = getenv('MY_VAR'), assert(strcmp(act, exp), strjoin({act exp}, '\n'));
96+
env:
97+
MY_VAR: my_value
98+
99+
# Remove when online batch licensing is the default
100+
- name: Verify MW_BATCH_LICENSING_ONLINE variable set
101+
uses: ./
102+
with:
103+
command: exp = 'true', act = getenv('MW_BATCH_LICENSING_ONLINE'), assert(strcmp(act, exp), strjoin({act exp}, '\n'));
104+
env:
105+
MY_VAR: my_value
106+

0 commit comments

Comments
 (0)