Skip to content

Commit

Permalink
Re-add example CI (#77)
Browse files Browse the repository at this point in the history
* Re-add example CI

* Update snapshot tests to iOS 18

* sudo

---------

Co-authored-by: Nick Entin <nick@portola.ai>
  • Loading branch information
luispadron and NickEntin authored Sep 25, 2024
1 parent 77046d2 commit 2bdbff8
Show file tree
Hide file tree
Showing 75 changed files with 49 additions and 22 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,33 @@ jobs:
swift build \
--sdk "$(xcode-select -p)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" \
--triple "arm64-apple-ios13.0"
xcode-build:
name: Xcode Build
runs-on: macOS-14
strategy:
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Bundle Install
run: bundle install --gemfile=Example/Gemfile
- name: Prepare Simulator Runtimes
run: Scripts/github/prepare-simulators.sh ${{ matrix.platform }}
- name: Pod Install
run: bundle exec --gemfile=Example/Gemfile pod install --project-directory=Example
- name: Select Xcode Version
run: sudo xcode-select -s /Applications/Xcode_16.app
- name: Build and Test
run: |
# run tests on the example app
xcodebuild test \
-workspace Example/Stagehand.xcworkspace \
-scheme "Stagehand Demo App" \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,OS=18.0,name=iPhone 16 Pro"
- name: Upload Results
uses: actions/upload-artifact@v4
if: failure()
with:
name: Test Results
path: .build/derivedData/**/Logs/Test/*.xcresult
2 changes: 1 addition & 1 deletion Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: b4841bd82e57283ff97d83f4bb89137cc01f6102

COCOAPODS: 1.11.3
COCOAPODS: 1.14.3
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "NO">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "Stagehand_Example.app"
BlueprintName = "Stagehand_Example"
ReferencedContainer = "container:Stagehand.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "FB_REFERENCE_IMAGE_DIR"
value = "$(SOURCE_ROOT)/Unit Tests/ReferenceImages/"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -63,24 +79,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "Stagehand_Example.app"
BlueprintName = "Stagehand_Example"
ReferencedContainer = "container:Stagehand.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "FB_REFERENCE_IMAGE_DIR"
value = "$(SOURCE_ROOT)/Unit Tests/ReferenceImages/"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -102,8 +100,6 @@
ReferencedContainer = "container:Stagehand.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
3 changes: 2 additions & 1 deletion Example/Unit Tests/SnapshotTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ class SnapshotTestCase: FBSnapshotTestCase {
// MARK: - Private Static Properties

private static let testedDevices = [
TestDeviceConfig(systemVersion: "13.7", screenSize: CGSize(width: 375, height: 812), screenScale: 3),
// iPhone 16 Pro - iOS 18.0
TestDeviceConfig(systemVersion: "18.0", screenSize: CGSize(width: 402, height: 874), screenScale: 3),
]

// MARK: - FBSnapshotTestCase
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.

0 comments on commit 2bdbff8

Please sign in to comment.