diff --git a/.buildkite/cache-builder.yml b/.buildkite/cache-builder.yml index 7d6da67896a1..0a9aaee6a1bc 100644 --- a/.buildkite/cache-builder.yml +++ b/.buildkite/cache-builder.yml @@ -13,13 +13,13 @@ common_params: repo: "wordpress-mobile/wordpress-ios/" # Common environment values to use with the `env` key. - &common_env - IMAGE_ID: xcode-12.5.1 + IMAGE_ID: xcode-13 steps: ################# # Build the CocoaPods Base Cache - # + # # This prevents the base cache from infinite growth caused by storing every # version of every pod we've ever used. ################# diff --git a/.buildkite/commands/build-for-testing.sh b/.buildkite/commands/build-for-testing.sh index 9b1fcc701ed4..24241f55f657 100755 --- a/.buildkite/commands/build-for-testing.sh +++ b/.buildkite/commands/build-for-testing.sh @@ -1,5 +1,9 @@ #!/bin/bash -eu +# FIXIT-13.1: Temporary fix until we're on the Xcode 13.1 VM +echo "--- :rubygems: Fixing Ruby Setup" +gem install bundler + echo "--- :rubygems: Setting up Gems" restore_cache "$(hash_file .ruby-version)-$(hash_file Gemfile.lock)" install_gems diff --git a/.buildkite/commands/run-ui-tests.sh b/.buildkite/commands/run-ui-tests.sh index cfe7189afd8a..8b33d727c86a 100755 --- a/.buildkite/commands/run-ui-tests.sh +++ b/.buildkite/commands/run-ui-tests.sh @@ -14,6 +14,10 @@ echo "--- :wrench: Fixing VM" brew install openjdk@11 sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk +# Temporary fix until we're on the Xcode 13.1 VM +echo "--- :rubygems: Fixing Ruby Setup" +gem install bundler + echo "--- :rubygems: Setting up Gems" install_gems diff --git a/.buildkite/commands/run-unit-tests.sh b/.buildkite/commands/run-unit-tests.sh index 22e262582d5b..be380b1959c3 100755 --- a/.buildkite/commands/run-unit-tests.sh +++ b/.buildkite/commands/run-unit-tests.sh @@ -4,6 +4,10 @@ echo "--- 📦 Downloading Build Artifacts" download_artifact build-products.tar tar -xf build-products.tar +# Temporary fix until we're on the Xcode 13.1 VM +echo "--- :rubygems: Fixing Ruby Setup" +gem install bundler + echo "--- :rubygems: Setting up Gems" install_gems diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 000f6dd43ff9..7d98026e85dc 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -8,7 +8,7 @@ common_params: repo: "wordpress-mobile/wordpress-ios/" # Common environment values to use with the `env` key. - &common_env - IMAGE_ID: xcode-12.5.1 + IMAGE_ID: xcode-13 # Remember to address all 'FIXIT-13.1' comments when we'll update to new image # This is the default pipeline – it will build and test the app steps: @@ -45,7 +45,7 @@ steps: # UI Tests ################# - label: "🧪 UI Tests (iPhone)" - command: .buildkite/commands/run-ui-tests.sh WordPressUITests 'iPhone 11' 14.1 + command: .buildkite/commands/run-ui-tests.sh WordPressUITests 'iPhone 13' 15.0 depends_on: "build" env: *common_env plugins: *common_plugins @@ -54,7 +54,7 @@ steps: - label: "🧪 UI Tests (iPad)" - command: .buildkite/commands/run-ui-tests.sh WordPressUITests "iPad Air (4th generation)" 14.1 + command: .buildkite/commands/run-ui-tests.sh WordPressUITests "iPad Air (4th generation)" 15.0 depends_on: "build" env: *common_env plugins: *common_plugins diff --git a/.circleci/config.yml b/.circleci/config.yml index 487e626982d9..77bab3b8c8ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,15 +15,15 @@ parameters: default: false xcode_version: &xcode_version - xcode-version: "12.5.0" + xcode-version: "13.0.0" iphone_test_device: &iphone_test_device - device: iPhone 11 - ios-version: "14.4" + device: iPhone 12 + ios-version: "15.0" ipad_test_device: &ipad_test_device device: iPad Air (4th generation) - ios-version: "14.4" + ios-version: "15.0" commands: fix-image: @@ -39,7 +39,7 @@ commands: echo $PATH fi - chruby ruby-2.6.6 + chruby ruby-$(cat .ruby-version) gem install bundler # Prevent fastlane from checking for updates, also removing the verbose fastlane changelog at the end of each invocation. diff --git a/.ruby-version b/.ruby-version index e46a05b1967c..a4dd9dba4fbf 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.4 \ No newline at end of file +2.7.4 diff --git a/.xcversion b/.xcversion index 7ef6ffeed5a3..f0750610b36f 100644 --- a/.xcversion +++ b/.xcversion @@ -1 +1 @@ -12.5 \ No newline at end of file +13.0 diff --git a/Gemfile.lock b/Gemfile.lock index edcad4caff26..ba109aab68e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,8 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.3) + CFPropertyList (3.0.4) + rexml activesupport (5.2.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) @@ -14,21 +15,21 @@ GEM json (>= 1.5.1) artifactory (3.0.15) atomos (0.1.3) - aws-eventstream (1.1.1) - aws-partitions (1.465.0) - aws-sdk-core (3.114.1) + aws-eventstream (1.2.0) + aws-partitions (1.509.0) + aws-sdk-core (3.121.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.43.0) - aws-sdk-core (~> 3, >= 3.112.0) + aws-sdk-kms (1.48.0) + aws-sdk-core (~> 3, >= 3.120.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.96.0) - aws-sdk-core (~> 3, >= 3.112.0) + aws-sdk-s3 (1.103.0) + aws-sdk-core (~> 3, >= 3.120.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.3) + aws-sigv4 (~> 1.4) + aws-sigv4 (1.4.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) bigdecimal (1.4.4) @@ -81,16 +82,16 @@ GEM concurrent-ruby (1.1.9) declarative (0.0.20) diffy (3.4.0) - digest-crc (0.6.3) + digest-crc (0.6.4) rake (>= 12.0.0, < 14.0.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) - emoji_regex (3.2.2) + emoji_regex (3.2.3) escape (0.0.4) ethon (0.14.0) ffi (>= 1.15.0) - excon (0.82.0) + excon (0.85.0) faraday (1.8.0) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -113,12 +114,12 @@ GEM faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) - faraday_middleware (1.0.0) + faraday_middleware (1.1.0) faraday (~> 1.0) - fastimage (2.2.4) - fastlane (2.184.1) + fastimage (2.2.5) + fastlane (2.195.0) CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.3, < 3.0.0) + addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) @@ -133,7 +134,7 @@ GEM faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) - google-apis-androidpublisher_v3 (~> 0.1) + google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) google-cloud-storage (~> 1.31) highline (~> 2.0) @@ -142,6 +143,7 @@ GEM mini_magick (>= 4.9.4, < 5.0.0) multipart-post (~> 2.0.0) naturally (~> 2.2) + optparse (~> 0.1.1) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.3) @@ -182,47 +184,46 @@ GEM gh_inspector (1.1.3) git (1.9.1) rchardet (~> 1.8) - google-apis-androidpublisher_v3 (0.5.0) - google-apis-core (~> 0.1) - google-apis-core (0.3.0) + google-apis-androidpublisher_v3 (0.11.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-core (0.4.1) addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.14) - httpclient (>= 2.8.1, < 3.0) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) mini_mime (~> 1.0) representable (~> 3.0) - retriable (>= 2.0, < 4.0) + retriable (>= 2.0, < 4.a) rexml - signet (~> 0.14) webrick - google-apis-iamcredentials_v1 (0.4.0) - google-apis-core (~> 0.1) - google-apis-playcustomapp_v1 (0.3.0) - google-apis-core (~> 0.1) - google-apis-storage_v1 (0.4.0) - google-apis-core (~> 0.1) + google-apis-iamcredentials_v1 (0.7.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-playcustomapp_v1 (0.5.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-storage_v1 (0.8.0) + google-apis-core (>= 0.4, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) google-cloud-env (1.5.0) faraday (>= 0.17.3, < 2.0) - google-cloud-errors (1.1.0) - google-cloud-storage (1.31.1) + google-cloud-errors (1.2.0) + google-cloud-storage (1.34.1) addressable (~> 2.5) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) google-apis-storage_v1 (~> 0.1) - google-cloud-core (~> 1.2) - googleauth (~> 0.9) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (0.16.2) + googleauth (1.0.0) faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) - signet (~> 0.14) + signet (>= 0.16, < 2.a) highline (2.0.3) - http-cookie (1.0.3) + http-cookie (1.0.4) domain_name (~> 0.5) httpclient (2.8.3) i18n (1.8.10) @@ -235,7 +236,7 @@ GEM jwt (2.2.3) memoist (0.16.2) mini_magick (4.11.0) - mini_mime (1.1.0) + mini_mime (1.1.1) mini_portile2 (2.6.1) minitest (5.14.4) molinillo (0.6.6) @@ -254,6 +255,7 @@ GEM oj (3.13.9) optimist (3.0.1) options (2.3.2) + optparse (0.1.1) os (1.1.1) parallel (1.21.0) plist (3.6.0) @@ -278,13 +280,13 @@ GEM i18n ruby-macho (1.4.0) ruby2_keywords (0.0.5) - rubyzip (2.3.0) + rubyzip (2.3.2) sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) security (0.1.3) - signet (0.15.0) - addressable (~> 2.3) + signet (0.16.0) + addressable (~> 2.8) faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) @@ -310,16 +312,17 @@ GEM uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.7.7) - unicode-display_width (1.7.0) + unf_ext (0.0.8) + unicode-display_width (1.8.0) webrick (1.7.0) word_wrap (1.0.0) - xcodeproj (1.19.0) + xcodeproj (1.21.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) + rexml (~> 3.2.4) xcpretty (0.3.0) rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.1) diff --git a/WordPress/Classes/Extensions/Colors and Styles/WPStyleGuide+ApplicationStyles.swift b/WordPress/Classes/Extensions/Colors and Styles/WPStyleGuide+ApplicationStyles.swift index 59a65d8b4647..9b2d5e519dfd 100644 --- a/WordPress/Classes/Extensions/Colors and Styles/WPStyleGuide+ApplicationStyles.swift +++ b/WordPress/Classes/Extensions/Colors and Styles/WPStyleGuide+ApplicationStyles.swift @@ -55,10 +55,26 @@ extension WPStyleGuide { buttonBarAppearance.tintColor = .appBarTint } + /// Style `UITableView` in the app + class func configureTableViewAppearance() { + if #available(iOS 15.0, *) { + UITableView.appearance().sectionHeaderTopPadding = 0 + } + } + /// Style the tab bar using Muriel colors class func configureTabBarAppearance() { UITabBar.appearance().tintColor = .tabSelected UITabBar.appearance().unselectedItemTintColor = .tabUnselected + + if #available(iOS 15.0, *) { + let appearance = UITabBarAppearance() + appearance.configureWithOpaqueBackground() + appearance.backgroundColor = .systemBackground + + UITabBar.appearance().standardAppearance = appearance + UITabBar.appearance().scrollEdgeAppearance = appearance + } } /// Style the `LightNavigationController` UINavigationBar and BarButtonItems diff --git a/WordPress/Classes/System/WordPressAppDelegate.swift b/WordPress/Classes/System/WordPressAppDelegate.swift index ee2cef230740..93652dff86ff 100644 --- a/WordPress/Classes/System/WordPressAppDelegate.swift +++ b/WordPress/Classes/System/WordPressAppDelegate.swift @@ -821,6 +821,7 @@ extension WordPressAppDelegate { WPStyleGuide.configureTabBarAppearance() WPStyleGuide.configureNavigationAppearance() + WPStyleGuide.configureTableViewAppearance() WPStyleGuide.configureDefaultTint() WPStyleGuide.configureLightNavigationBarAppearance() diff --git a/WordPress/Classes/ViewRelated/User Profile Sheet/UserProfileSheetViewController.swift b/WordPress/Classes/ViewRelated/User Profile Sheet/UserProfileSheetViewController.swift index 29abbb26573d..83ebd159fa79 100644 --- a/WordPress/Classes/ViewRelated/User Profile Sheet/UserProfileSheetViewController.swift +++ b/WordPress/Classes/ViewRelated/User Profile Sheet/UserProfileSheetViewController.swift @@ -45,7 +45,6 @@ class UserProfileSheetViewController: UITableViewController { size.height += bottomPadding preferredContentSize = size - presentedVC?.presentedView?.layoutIfNeeded() } } diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 98f294c6bd2e..b6a427f16ced 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -844,6 +844,15 @@ platform :ios do UI.user_error!("Unable to find .xctestrun file at #{build_products_path}") end + # Because of what is likely a bug in `multi_scan`, we need to exclude + # certain tests from the execution. + # + # See more details at: + # - https://github.com/wordpress-mobile/WordPress-iOS/pull/17233#issuecomment-954897098 + # - https://github.com/lyndsey-ferguson/fastlane-plugin-test_center/issues/358 + all_tests = tests_from_xctestrun(xctestrun: test_plan_path) + only_testing = all_tests["WordPressTest"].reject { |t| t.include?("ContextManagerMock") || t.include?("TestContextManager") || t.include?("OCMLocation") || t.include?("HTTPStubsDescriptor") } + multi_scan( workspace: WORKSPACE_PATH, scheme: 'WordPress', @@ -851,6 +860,7 @@ platform :ios do deployment_target_version: options[:ios_version], ensure_devices_found: true, test_without_building: true, + only_testing: only_testing, xctestrun: test_plan_path, try_count: options[:try_count], output_directory: File.join(PROJECT_ROOT_FOLDER, 'build', 'results'),