From c05cdead345fb2912abf76a68b9f6618599705ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 28 Feb 2025 21:10:42 +0100 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f781bc8..280390d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,12 +27,24 @@ jobs: esac wget -qO /tmp/tpl https://github.com/jitsi/tpl/releases/latest/download/tpl-linux-${TPL_ARCH} chmod +x /tmp/tpl + - name: setup duktape + working-directory: /tmp + run: | + wget https://duktape.org/duktape-2.2.1.tar.xz + tar xvf duktape-2.2.1.tar.xz + cd duktape-2.2.1 + make -f Makefile.cmdline + mv duk /usr/local/bin - name: Run tpl with default values for web + env: + P2P_STUN_SERVERS: stun.l.google.com:19302,stun1.l.google.com:19302,stun2.l.google.com:19302 run: | /tmp/tpl web/rootfs/defaults/system-config.js > /tmp/config.js /tmp/tpl web/rootfs/defaults/settings-config.js >> /tmp/config.js + echo "console.log(JSON.stringify(config, undefined, 2));" >> /tmp/config.js + cat /tmp/config.js - name: Check config.js syntax - run: node /tmp/config.js + run: duk /tmp/config.js - name: Run tpl with default values for jvb run: | /tmp/tpl jvb/rootfs/defaults/jvb.conf > /tmp/jvb.conf