Skip to content

Commit 35887b8

Browse files
Refactor testing to support passing the device to the test
1 parent cae6e4c commit 35887b8

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.buildkite/pipeline.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,20 @@ steps:
2424
- label: "📦 Build and Test Swift Package ({{matrix}})"
2525
key: "test"
2626
command: |
27-
validate_swift_package
27+
validate_swift_package device:"{{matrix.device}}"
2828
plugins: [$CI_TOOLKIT]
2929
env:
3030
IMAGE_ID: "{{matrix}}"
3131
matrix:
32-
- $IMAGE_ID
33-
- "xcode-15.1"
32+
setup:
33+
image:
34+
- $IMAGE_ID
35+
device:
36+
- "iPhone SE (3rd generation) (17.5)"
37+
adjustments:
38+
- with:
39+
image: "xcode-15.1"
40+
device: "iPhone SE (3rd generation) (17.2)"
3441

3542
###################
3643
# Validate Podspec

fastlane/Fastfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ end
5050

5151
platform :ios do
5252
desc 'Builds the project and runs tests'
53-
lane :test do
53+
lane :test do |options|
54+
iphone_device = options[:device] ? options[:device].freeze : IPHONE_DEVICE
5455
run_tests(
5556
package_path: '.',
5657
scheme: 'Gravatar-Package',
5758
xcargs: COMMON_XCARGS,
58-
device: IPHONE_DEVICE,
59+
device: iphone_device,
5960
prelaunch_simulator: true,
6061
clean: true,
6162
buildlog_path: LOGS_FOLDER,

0 commit comments

Comments
 (0)