-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (53 loc) · 2.1 KB
/
detox-ios.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Detox Integration Tests - iOS
on: [push]
jobs:
build:
name: Detox Integration Tests - iOS
# macos-13 fails with a Detox error about the iPhone 13 Pro device type:
# ```
# DetoxRuntimeError: Failed to find a device by type = "iPhone 13 Pro"
# HINT: Run 'applesimutils --list' to list your supported devices. It is advised only to specify a device type, e.g., "iPhone Xʀ" and avoid explicit search by OS version.
# ```
# However, applesimutils --list reports that a device with "iPhone 13 Pro" exists
runs-on: macos-13
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 'latest'
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
# Sharp CLI enables faster image generation during prebuild
# https://github.com/expo/expo-cli/issues/2676
- name: Install Sharp CLI for faster image generation during prebuild
run: npm install --global sharp-cli
# CocoaPods version 1.15.0 has incompatibilities with React Native
# https://github.com/facebook/react-native/issues/42698
# https://github.com/expo/expo/issues/26828
# https://github.com/CocoaPods/CocoaPods/issues/12226
- name: Upgrade CocoaPods to version 1.15.2
run: |
gem uninstall cocoapods -v 1.15.0 --ignore-dependencies
gem install cocoapods -v 1.15.2
- name: Prepare files for xcodebuild command
run: pnpm expo prebuild --platform ios
- name: Build iOS app locally with xcodebuild
run: pnpm detox build --configuration ios
- name: Set up Simulator for Detox
run: |
brew tap wix/brew
brew install applesimutils
- name: Run tests
run: pnpm detox test --configuration ios
# Store any Detox screenshots on test failure
- uses: actions/upload-artifact@v4
if: failure()
with:
name: detox-artifacts
path: .detoxArtifacts