Ich habe ein iOS-Projekt von Swift 3.0 mit CocoaPods geschrieben. Ich habe Gitlab CI für dieses Projekt konfiguriert und es funktioniert perfekt. Das ist meine .gitlab-ci.yml Datei:Code Coverage für Swift 3.0 Projekt in Gitlab CI
stages:
- build
build_project:
stage: build
script:
- rm -rf Pods;rm -rf MyProject.xcworkspace;rm -rf MyProject.xcodeproj/project.xcworkspace
- pod install
- xcodebuild clean -workspace MyProject.xcworkspace -scheme MyProject | xcpretty
- xcodebuild test -workspace MyProject.xcworkspace -scheme MyProject -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.2' | xcpretty -s
tags:
- ios
- lunchdot
Ich kann nicht Code-Coverage für dieses Projekt in meinem Gitlab Repo sehen. Im Moment ist eine Deckungsspalte für alle meine Builds leer. Ich habe versucht, Testabdeckung Parsing in CI/CD-Pipelines Gitlab Einstellungen, aber es hatte keine Wirkung, weil ich Regex für Swift nicht wissen. Ist es möglich, Code Coverage für das Swift-Projekt in Gitlab CI einzurichten? Wie kann ich das machen?
Noch nicht einmal ein Kommentar ... :(Ich brauche die Antwort auch. – OliverM
Haben Sie aktivieren "collect code coverage" in dem Schema? Ich tat ... aber trotzdem keine Berichterstattung – OliverM
@OliverM Ja, tat ich, aber Es hat keinen Effekt. Ich verwende Xcode-Tool für Code-Coverage-Analyse. – Svyatoslav