使用gitlab-CI template
およびiPhone 5Sで、例えば、シミュレータの名前が含まれている一つの変数を定義します。
# Job
.test_ios_job: &test_ios_job_def
stage: test_ios
script:
- xcodebuild test -workspace myproject.xcworkspace -scheme myScheme -destination 'platform=iOS Simulator,name=$SIMULATOR'
# iPhone 5S
test_ios_iPhone5S_9.1:
<<: *test_ios_job_def
variables:
SIMULATOR: "iPhone 5S,OS=9.1"
test_ios_iPhone5S_10.1:
<<: *test_ios_job_def
variables:
SIMULATOR: "iPhone 5S,OS=10.1"
を私は簡単にするために、fastlane
を使用するようにプラグインscan
をお勧めします作品:
# Job
.test_ios_job: &test_ios_job_def
stage: test_ios
script:
- fastlane testios emulatorname:"$SIMULATOR"
test_ios_iPhone5S_9.1:
<<: *test_ios_job_def
variables:
SIMULATOR: "iPhone 5s (9.1)"
test_ios_iPhone5S_10.1:
<<: *test_ios_job_def
variables:
SIMULATOR: "iPhone 5s (10.1)"
fastlaneジョブ:
lane :testios do |options|
emulatorname = options[:emulatorname]
#Scan
scan(
scheme: S_APP_SCHEME_TEST,
clean: true,
device: "#{emulatorname.to_s}",
)
end
私の質問は、ジョブとステージを複製せずに、複数のバージョンのデバイスとiOSで同じジョブを実行することに関するものでした。 exempleについては 、のために 'xcodebuild test'をやって: - iPhone 6/iOSの9.3 - iPhone 6/iOSの10.0 - 7/iOSの10.0 iPhone - iPadのミニ/ iOSの8.2 - iPadのミニ/ iOSの9.3 。 ... –
この例を編集して質問に追加してください! –