How to force CI to use the latest pods after project was moved to Xcode 10 and latest wift 4.2?

孤街醉人 提交于 2019-12-11 17:06:49

问题


The question is because we see an error after moving project to the latest Xcode 10 and Swift 4.2:

My fastfile looks like:

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

and 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

来源:https://stackoverflow.com/questions/52406240/how-to-force-ci-to-use-the-latest-pods-after-project-was-moved-to-xcode-10-and-l

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!