Skip to content

Commit b3f9671

Browse files
authored
DRY scheme and iOS version definition in UI tests CI script (#19193)
2 parents ad7633a + 1143b31 commit b3f9671

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

.buildkite/commands/run-ui-tests.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/bin/bash -eu
22

3-
TEST_NAME=$1
4-
DEVICE=$2
5-
IOS_VERSION=$3
3+
DEVICE=$1
64

7-
echo "Running $TEST_NAME on $DEVICE for iOS $IOS_VERSION"
5+
echo "Running UI tests on $DEVICE. The iOS version will be the latest available in the CI host."
86

97
# Run this at the start to fail early if value not available
108
echo '--- :test-analytics: Configuring Test Analytics'
@@ -36,7 +34,7 @@ echo "--- 🔬 Testing"
3634
xcrun simctl list >> /dev/null
3735
rake mocks &
3836
set +e
39-
bundle exec fastlane test_without_building name:"$TEST_NAME" try_count:3 device:"$DEVICE" ios_version:"$IOS_VERSION"
37+
bundle exec fastlane test_without_building name:WordPressUITests device:"$DEVICE"
4038
TESTS_EXIT_STATUS=$?
4139
set -e
4240

.buildkite/commands/run-unit-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ install_gems
1717

1818
echo "--- 🔬 Testing"
1919
set +e
20-
bundle exec fastlane test_without_building name:WordPressUnitTests try_count:3
20+
bundle exec fastlane test_without_building name:WordPressUnitTests
2121
TESTS_EXIT_STATUS=$?
2222
set -e
2323

.buildkite/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ steps:
7676
- group: "🔬 UI Tests"
7777
steps:
7878
- label: "🔬 UI Tests (iPhone)"
79-
command: .buildkite/commands/run-ui-tests.sh WordPressUITests 'iPhone 13' 15.0
79+
command: .buildkite/commands/run-ui-tests.sh 'iPhone 13'
8080
depends_on: "build"
8181
env: *common_env
8282
plugins: *common_plugins
@@ -91,7 +91,7 @@ steps:
9191
if: build.state == "failed" && build.branch == "trunk"
9292

9393
- label: "🔬 UI Tests (iPad)"
94-
command: .buildkite/commands/run-ui-tests.sh WordPressUITests "iPad Air (5th generation)" 15.0
94+
command: .buildkite/commands/run-ui-tests.sh "iPad Air (5th generation)"
9595
depends_on: "build"
9696
env: *common_env
9797
plugins: *common_plugins

0 commit comments

Comments
 (0)