From cd28a8ad384971f66aa2df8a8db141dd510a247a Mon Sep 17 00:00:00 2001 From: lofyer Date: Wed, 5 Aug 2026 19:54:01 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E9=9B=86=E6=88=90=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=B2=99=E7=AE=B1=EF=BC=8Crunner=20=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E7=BB=99=20chrome-sandbox=20=E5=8A=A0=20setuid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6b163b..91b4292 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,9 +69,11 @@ jobs: sudo apt-get install -y xvfb libnss3 libatk1.0-0t64 libatk-bridge2.0-0t64 \ libcups2t64 libgbm1 libasound2t64 libgtk-3-0t64 >> /tmp/apt.log 2>&1 \ || annotate "运行库安装失败" /tmp/apt.log + # runner 上的 chrome-sandbox 拿不到 root:root 4755,SUID 沙箱起不来。 + # 只在 CI 关沙箱,不要把这个开关带进构建产物。 for suite in startup download cover annotation reader-features library-notes ai-scope; do echo "::group::$suite" - xvfb-run -a npx electron "src/_test/electron/$suite.integration.js" \ + xvfb-run -a npx electron --no-sandbox "src/_test/electron/$suite.integration.js" \ > "/tmp/$suite.log" 2>&1 || { echo "::endgroup::"; annotate "集成测试失败 $suite" "/tmp/$suite.log"; } tail -3 "/tmp/$suite.log" echo "::endgroup::"