From 70b75f529468574df6b0876d95947b0f242d6bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Fri, 13 Dec 2024 10:34:21 -0600 Subject: [PATCH] feat(build): Checks config.js syntax. (#1981) * feat(build): Checks config.js syntax. * Update .github/workflows/ci.yml Co-authored-by: Aaron van Meerten * Update .github/workflows/ci.yml Co-authored-by: Aaron van Meerten * squash: Prepare for system-config.js. * squash: Fix order. * Update ci.yml (#1982) * Update ci.yml * Update ci.yml --------- Co-authored-by: Aaron van Meerten --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6f7318..c18e406 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,32 @@ on: - master jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - name: Check Node / npm versions + run: | + node -v + npm -v + - name: setup tpl + run: | + dpkgArch="$(dpkg --print-architecture)" + case "${dpkgArch##*-}" in \ + "amd64") TPL_ARCH=amd64; S6_ARCH=amd64 ;; \ + "arm64") TPL_ARCH=arm64; S6_ARCH=aarch64 ;; \ + *) echo "unsupported architecture"; exit 1 ;; \ + esac + wget -qO /tmp/tpl https://github.com/jitsi/tpl/releases/download/v1.4.0/tpl-linux-${TPL_ARCH} + chmod +x /tmp/tpl + - name: Run tpl with default values for system-config.js + run: | + /tmp/tpl web/rootfs/defaults/system-config.js > /tmp/config.js + /tmp/tpl web/rootfs/defaults/settings-config.js >> /tmp/config.js + - name: Check config.js syntax + run: node /tmp/config.js build: runs-on: ubuntu-latest steps: