在项目移至Xcode 10和最新的wift 4.2之后,如何强制CI使用最新的pod?

时间:2018-09-19 12:48:21

标签: swift xcode cocoapods fastlane xcode10

问题是因为在将项目移至最新的Xcode 10和Swift 4.2之后,我们看到了一个错误:

我的快速文件如下:

before_all do
  xcversion(version: "10.0")
end
lane :test do
  scan(scheme: SCHEME_NAME, code_coverage: true, output_directory: OUTPUT_PATH + 'tests')
  xcov(
    scheme: SCHEME_NAME, 
    workspace: WORKSPACE_FILE_PATH, 
    json_report: true, 
    markdown_report: true, 
    output_directory: OUTPUT_PATH + "coverage", 
    skip_slack: true,
    only_project_targets: true
  )
end

gitlab-ci.yml

stages:
  - build
  - test
  - deploy
  - export

build:
  stage: build
  script:
    - bundle exec pod repo update
    - bundle exec pod install
    - export
  after_script:
    - rm -rf ~/Library/Developer/Xcode/Archives || true
  artifacts:
    name: "Staff_${CI_PIPELINE_ID}"
    paths:
      - Pods/*
      - Staff.xcworkspace
  when: on_success
  tags:
      - iOS

test:
  stage: test
  before_script:
    - killall "Simulator" || true
  script:
    - bundle exec fastlane snapshot reset_simulators --force
    - bundle exec fastlane test
  after_script:
    - killall "Simulator" || true
    - rm -rf ~/Library/Developer/Xcode/Archives || true
  artifacts:
    name: "Staff_${CI_PIPELINE_ID}"
    paths:
      - fastlane/output/coverage
  when: on_success
  tags:
    - iOS

enter image description here

0 个答案:

没有答案