Skip to content

Commit b8a8f09

Browse files
committed
feat(ci) test config.js syntax with Duktape 2.2.1
This is the version we evaluate config.js with on Android, making it the lowest common denominator. While being a nifty little engine, it suffers from not being fully ES6 compliant, so things like arrow functions or template strings are not implemented.
1 parent 379f77b commit b8a8f09

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,24 @@ jobs:
2727
esac
2828
wget -qO /tmp/tpl https://github.com/jitsi/tpl/releases/latest/download/tpl-linux-${TPL_ARCH}
2929
chmod +x /tmp/tpl
30+
- name: setup duktape
31+
working-directory: /tmp
32+
run: |
33+
wget https://duktape.org/duktape-2.2.1.tar.xz
34+
tar xvf duktape-2.2.1.tar.xz
35+
cd duktape-2.2.1
36+
make -f Makefile.cmdline
37+
mv duk /usr/local/bin
3038
- name: Run tpl with default values for web
39+
env:
40+
P2P_STUN_SERVERS: stun.l.google.com:19302,stun1.l.google.com:19302,stun2.l.google.com:19302
3141
run: |
3242
/tmp/tpl web/rootfs/defaults/system-config.js > /tmp/config.js
3343
/tmp/tpl web/rootfs/defaults/settings-config.js >> /tmp/config.js
44+
echo "console.log(JSON.stringify(config, undefined, 2));" >> /tmp/config.js
45+
cat /tmp/config.js
3446
- name: Check config.js syntax
35-
run: node /tmp/config.js
47+
run: duk /tmp/config.js
3648
- name: Run tpl with default values for jvb
3749
run: |
3850
/tmp/tpl jvb/rootfs/defaults/jvb.conf > /tmp/jvb.conf

0 commit comments

Comments
 (0)