ci: 集成测试关闭沙箱,runner 无法给 chrome-sandbox 加 setuid
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, linux, ubuntu-24.04-arm) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, macos, macos-15) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, linux, ubuntu-24.04) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, windows, windows-2025) (push) Blocked by required conditions
构建与发布 / 发布 GitHub Release (push) Blocked by required conditions
构建与发布 / 单测与集成测试 (push) Waiting to run
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, linux, ubuntu-24.04-arm) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, macos, macos-15) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, linux, ubuntu-24.04) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, windows, windows-2025) (push) Blocked by required conditions
构建与发布 / 发布 GitHub Release (push) Blocked by required conditions
构建与发布 / 单测与集成测试 (push) Waiting to run
This commit is contained in:
@@ -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::"
|
||||
|
||||
Reference in New Issue
Block a user