Fix missing UI tests simulator (#860)

* Fix UI and integration tests missing simulators (older)

* Update fastlane and dependencies
This commit is contained in:
Stefan Ceriu
2023-05-09 07:43:44 +03:00
committed by GitHub
parent 542cefd703
commit 521eeb2ecf
3 changed files with 60 additions and 33 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ jobs:
- name: Setup environment - name: Setup environment
run: run:
source ci_scripts/ci_common.sh && setup_github_actions_environment source ci_scripts/ci_common.sh && setup_github_actions_environment
- name: Run tests - name: Run tests
run: bundle exec fastlane ui_tests run: bundle exec fastlane ui_tests
+31 -31
View File
@@ -1,28 +1,28 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
CFPropertyList (3.0.5) CFPropertyList (3.0.6)
rexml rexml
activesupport (7.0.4) activesupport (7.0.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2) i18n (>= 1.6, < 2)
minitest (>= 5.1) minitest (>= 5.1)
tzinfo (~> 2.0) tzinfo (~> 2.0)
addressable (2.8.1) addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0) public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15) artifactory (3.0.15)
atomos (0.1.3) atomos (0.1.3)
aws-eventstream (1.2.0) aws-eventstream (1.2.0)
aws-partitions (1.682.0) aws-partitions (1.760.0)
aws-sdk-core (3.168.4) aws-sdk-core (3.171.1)
aws-eventstream (~> 1, >= 1.0.2) aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0) aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5) aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1) jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.61.0) aws-sdk-kms (1.64.0)
aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1) aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.117.2) aws-sdk-s3 (1.122.0)
aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1) aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4) aws-sigv4 (~> 1.4)
@@ -35,7 +35,7 @@ GEM
colored2 (3.1.2) colored2 (3.1.2)
commander (4.6.0) commander (4.6.0)
highline (~> 2.0.0) highline (~> 2.0.0)
concurrent-ruby (1.1.10) concurrent-ruby (1.2.2)
declarative (0.0.20) declarative (0.0.20)
digest-crc (0.6.4) digest-crc (0.6.4)
rake (>= 12.0.0, < 14.0.0) rake (>= 12.0.0, < 14.0.0)
@@ -43,8 +43,8 @@ GEM
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1) dotenv (2.8.1)
emoji_regex (3.2.3) emoji_regex (3.2.3)
excon (0.95.0) excon (0.99.0)
faraday (1.10.2) faraday (1.10.3)
faraday-em_http (~> 1.0) faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0) faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1) faraday-excon (~> 1.1)
@@ -73,7 +73,7 @@ GEM
faraday_middleware (1.2.0) faraday_middleware (1.2.0)
faraday (~> 1.0) faraday (~> 1.0)
fastimage (2.2.6) fastimage (2.2.6)
fastlane (2.211.0) fastlane (2.212.2)
CFPropertyList (>= 2.3, < 4.0.0) CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0) addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0) artifactory (~> 3.0)
@@ -122,9 +122,9 @@ GEM
fastlane-plugin-xcodegen (1.1.0) fastlane-plugin-xcodegen (1.1.0)
fastlane-plugin-brew (~> 0.1.1) fastlane-plugin-brew (~> 0.1.1)
gh_inspector (1.1.3) gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.32.0) google-apis-androidpublisher_v3 (0.41.0)
google-apis-core (>= 0.9.1, < 2.a) google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.9.2) google-apis-core (0.11.0)
addressable (~> 2.5, >= 2.5.1) addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a) googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a) httpclient (>= 2.8.1, < 3.a)
@@ -133,10 +133,10 @@ GEM
retriable (>= 2.0, < 4.a) retriable (>= 2.0, < 4.a)
rexml rexml
webrick webrick
google-apis-iamcredentials_v1 (0.16.0) google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.9.1, < 2.a) google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.12.0) google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.9.1, < 2.a) google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.19.0) google-apis-storage_v1 (0.19.0)
google-apis-core (>= 0.9.0, < 2.a) google-apis-core (>= 0.9.0, < 2.a)
google-cloud-core (1.6.0) google-cloud-core (1.6.0)
@@ -144,7 +144,7 @@ GEM
google-cloud-errors (~> 1.0) google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0) google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0) faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.0) google-cloud-errors (1.3.1)
google-cloud-storage (1.44.0) google-cloud-storage (1.44.0)
addressable (~> 2.8) addressable (~> 2.8)
digest-crc (~> 0.4) digest-crc (~> 0.4)
@@ -153,7 +153,7 @@ GEM
google-cloud-core (~> 1.6) google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a) googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0) mini_mime (~> 1.0)
googleauth (1.3.0) googleauth (1.5.2)
faraday (>= 0.17.3, < 3.a) faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0) jwt (>= 1.4, < 3.0)
memoist (~> 0.16) memoist (~> 0.16)
@@ -165,30 +165,30 @@ GEM
http-cookie (1.0.5) http-cookie (1.0.5)
domain_name (~> 0.5) domain_name (~> 0.5)
httpclient (2.8.3) httpclient (2.8.3)
i18n (1.12.0) i18n (1.13.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jmespath (1.6.2) jmespath (1.6.2)
json (2.6.3) json (2.6.3)
jwt (2.5.0) jwt (2.7.0)
memoist (0.16.2) memoist (0.16.2)
mime-types (3.4.1) mime-types (3.4.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105) mime-types-data (3.2023.0218.1)
mini_magick (4.12.0) mini_magick (4.12.0)
mini_mime (1.1.2) mini_mime (1.1.2)
minitest (5.16.3) minitest (5.18.0)
multi_json (1.15.0) multi_json (1.15.0)
multipart-post (2.0.0) multipart-post (2.0.0)
nanaimo (0.3.0) nanaimo (0.3.0)
naturally (2.2.1) naturally (2.2.1)
netrc (0.11.0) netrc (0.11.0)
nokogiri (1.13.10-arm64-darwin) nokogiri (1.14.3-arm64-darwin)
racc (~> 1.4) racc (~> 1.4)
optparse (0.1.1) optparse (0.1.1)
os (1.1.4) os (1.1.4)
plist (3.6.0) plist (3.7.0)
public_suffix (5.0.1) public_suffix (5.0.1)
racc (1.6.1) racc (1.6.2)
rake (13.0.6) rake (13.0.6)
representable (3.2.0) representable (3.2.0)
declarative (< 0.1.0) declarative (< 0.1.0)
@@ -210,10 +210,10 @@ GEM
faraday (>= 0.17.5, < 3.a) faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0) jwt (>= 1.5, < 3.0)
multi_json (~> 1.10) multi_json (~> 1.10)
simctl (1.6.8) simctl (1.6.10)
CFPropertyList CFPropertyList
naturally naturally
slather (2.7.3) slather (2.7.4)
CFPropertyList (>= 2.2, < 4) CFPropertyList (>= 2.2, < 4)
activesupport activesupport
clamp (~> 1.3) clamp (~> 1.3)
@@ -227,14 +227,14 @@ GEM
tty-screen (0.8.1) tty-screen (0.8.1)
tty-spinner (0.9.3) tty-spinner (0.9.3)
tty-cursor (~> 0.7) tty-cursor (~> 0.7)
tzinfo (2.0.5) tzinfo (2.0.6)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
uber (0.1.0) uber (0.1.0)
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.8.2) unf_ext (0.0.8.2)
unicode-display_width (1.8.0) unicode-display_width (1.8.0)
webrick (1.7.0) webrick (1.8.1)
word_wrap (1.0.0) word_wrap (1.0.0)
xcode-install (2.8.1) xcode-install (2.8.1)
claide (>= 0.9.1) claide (>= 0.9.1)
+28 -1
View File
@@ -109,7 +109,12 @@ lane :unit_tests do
) )
end end
lane :ui_tests do lane :ui_tests do
create_simulator_if_necessary(
name: "iPad (9th generation)",
type: "com.apple.CoreSimulator.SimDeviceType.iPad-9th-generation"
)
run_tests( run_tests(
scheme: "UITests", scheme: "UITests",
devices: ["iPhone 14", "iPad (9th generation)"], devices: ["iPhone 14", "iPad (9th generation)"],
@@ -128,6 +133,11 @@ lane :ui_tests do
end end
lane :integration_tests do lane :integration_tests do
create_simulator_if_necessary(
name: "iPhone 13 Pro",
type: "com.apple.CoreSimulator.SimDeviceType.iPhone-13-Pro"
)
run_tests( run_tests(
scheme: "IntegrationTests", scheme: "IntegrationTests",
devices: ["iPhone 13 Pro"], devices: ["iPhone 13 Pro"],
@@ -330,3 +340,20 @@ private_lane :update_app_icon do |options|
end end
end end
end end
private_lane :create_simulator_if_necessary do |options|
simulator_name = options[:name]
UI.user_error!("Invalid simulator name") unless !simulator_name.to_s.empty?
simulator_type = options[:type]
UI.user_error!("Invalid simulator type") unless !simulator_type.to_s.empty?
# Use use a `(` here to avoid matching `iPhone 13 Pro` on `iPhone 13 Pro Max` for example
begin sh("xcrun simctl list devices | grep '#{simulator_name} ('")
UI.success "Simulator already exists"
rescue
sh("xcrun simctl create '#{simulator_name}' #{simulator_type}")
end
end