mirror of
https://github.com/bitwarden/ios.git
synced 2025-12-15 14:00:25 -06:00
[PM-11213] Use iPhone 16 Pro test device and finish updating builds for Xcode 16.1 (#1096)
This commit is contained in:
parent
e2fd662078
commit
e02d571371
8
.github/workflows/CI-main.yml
vendored
8
.github/workflows/CI-main.yml
vendored
@ -19,7 +19,6 @@ on:
|
||||
description: "Distribute to TestFlight"
|
||||
type: boolean
|
||||
env:
|
||||
XCODE_VERSION: '15.4'
|
||||
DISTRIBUTE_TO_TESTFLIGHT: ${{ github.event_name == 'push' || inputs.distribute }}
|
||||
INTERNAL_BETA_PATCH_NUMBER: 999
|
||||
|
||||
@ -30,7 +29,7 @@ jobs:
|
||||
outputs:
|
||||
version_name: ${{ steps.version_info.outputs.version_name }}
|
||||
version_number: ${{ steps.version_info.outputs.version_number }}
|
||||
xcode_version: ${{ env.XCODE_VERSION }}
|
||||
xcode_version: ${{ steps.xcode_version.outputs.xcode_version }}
|
||||
distribute_to_testflight: ${{ env.DISTRIBUTE_TO_TESTFLIGHT }}
|
||||
internal_beta_version_name: ${{ steps.internal_versions.outputs.internal_beta_version_name}}
|
||||
steps:
|
||||
@ -43,6 +42,11 @@ jobs:
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
echo "</details>" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: Read default Xcode version
|
||||
id: xcode_version
|
||||
run: |
|
||||
echo "xcode_version=$(cat .xcode-version | tr -d '\n')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Calculate version
|
||||
if: ${{ inputs.build-number == '' || inputs.build-version == '' }}
|
||||
uses: bitwarden/ios/.github/actions/dispatch-and-download@main
|
||||
|
||||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -347,7 +347,7 @@ jobs:
|
||||
- name: Upload IPA & dSYM files
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
with:
|
||||
name: Bitwarden iOS ${{ steps.version_info.outputs.version_name }} (${{ steps.version_info.outputs.version_number }}) ${{ env.BUILD_VARIANT }} ${{ env.XCODE_VERSION }}
|
||||
name: Bitwarden iOS ${{ steps.version_info.outputs.version_name }} (${{ steps.version_info.outputs.version_number }}) ${{ env.BUILD_VARIANT }} ${{ env.XCODE_VERSION || env.DEFAULT_XCODE_VERSION }}
|
||||
path: export
|
||||
if-no-files-found: error
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
iPhone 15 Pro
|
||||
iPhone 16 Pro
|
||||
|
||||
@ -9,13 +9,14 @@ open class BitwardenTestCase: XCTestCase {
|
||||
|
||||
@MainActor
|
||||
override open class func setUp() {
|
||||
if UIDevice.current.name != "iPhone 15 Pro" || UIDevice.current.systemVersion != "18.1" {
|
||||
assertionFailure(
|
||||
"""
|
||||
Tests must be run using iOS 18.1 on an iPhone 15 Pro simulator. Snapshot tests depend on using the correct device.
|
||||
"""
|
||||
)
|
||||
}
|
||||
if UIDevice.current.name != "iPhone 16 Pro" || UIDevice.current.systemVersion != "18.1" {
|
||||
assertionFailure(
|
||||
"""
|
||||
Tests must be run using iOS 18.1 on an iPhone 16 Pro simulator.
|
||||
Snapshot tests depend on using the correct device.
|
||||
"""
|
||||
)
|
||||
}
|
||||
|
||||
// Apply default appearances for snapshot tests.
|
||||
UI.applyDefaultAppearances()
|
||||
|
||||
@ -61,12 +61,12 @@
|
||||
|
||||
### Run the App
|
||||
|
||||
1. Open the project in Xcode 15.4+.
|
||||
1. Open the project in Xcode 16.1+.
|
||||
2. Run the app in the Simulator with the `Bitwarden` target.
|
||||
|
||||
### Running Tests
|
||||
|
||||
The test target requires running in an iPhone 15 Pro simulator running iOS 18.1. It is, however, worth noting that our snapshot tests almost entirely work off of enforced iPhone 12/13/14 dimensions, with a 3x scale; however a few use the dimensions of the chosen simulator, and thus require an iPhone 15 Pro.
|
||||
The test target requires running in an iPhone 16 Pro simulator running iOS 18.1. While our snapshot tests work off of enforced device dimensions, small differences can still arise between devices and iOS versions, and this makes sure our snapshots are as consistent as we can make them in testing.
|
||||
|
||||
1. In Xcode's toolbar, select the project and a connected device or simulator.
|
||||
- The `Generic iOS Device` used for builds will not work for testing.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user