iOS:gitlab-runner 卡在 CI 上

Bha*_*duk 6 xcode ios gitlab gitlab-ci gitlab-ci-runner

我正在 Gitlab CI 上工作,但遇到了一些与测试运行相关的问题,如下命令正在终端上运行并给出了完美的测试结果,但不知何故它现在在 gitlab CI 上运行。

下面是我的.gitlab-ci.yml

stages:
  - build

build_project:
  stage: build
  script:
    - xcodebuild clean -workspace "First Container.xcworkspace" -scheme "First Container" | xcpretty
    - xcodebuild test -workspace "First Container.xcworkspace" -scheme "First Container" -destination 'platform=iOS Simulator,name=iPhone 8 Plus,OS=11.3' | xcpretty
  tags:
    - ios_11-3
    - xcode_9-3
    - osx_10-13-4
Run Code Online (Sandbox Code Playgroud)

以下命令在我的终端上运行:

   $ xcodebuild test -workspace "First Container.xcworkspace" -scheme "First Container" -destination 'platform=iOS Simulator,name=iPhone 8 Plus,OS=11.3' | xcpretty
Run Code Online (Sandbox Code Playgroud)

但是当我在 CI 上运行时它卡住了,我的 gitlab-runner 没有启动 iPhone 模拟器并运行测试,构建正在工作

在此输入图像描述

aca*_*ano 0

这件事就发生在我身上。原因是因为我在系统模式下运行跑步者。

我更改为使用模式,并且在更改所需文件夹的权限后它就起作用了。