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