Skip to content

Commit

Permalink
ci(detox-ios): add back detox tests for IOS
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-pearson-mattr committed Dec 5, 2024
1 parent 20bc43c commit 8532502
Showing 1 changed file with 104 additions and 104 deletions.
208 changes: 104 additions & 104 deletions .github/workflows/ci-detox-ios.yml
Original file line number Diff line number Diff line change
@@ -1,104 +1,104 @@
# name: ci-detox-ios

# on:
# pull_request:
# branches:
# - master

# jobs:

# libraries:
# name: Build Wrapper Libraries
# runs-on: macos-latest
# defaults:
# run:
# working-directory: ./wrappers/react-native
# steps:
# - name: Checkout
# uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # [email protected]

# - name: Setup rust toolchain
# uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # [email protected]
# with:
# profile: minimal
# toolchain: stable
# override: true

# - name: Build Libraries for iOS
# run: yarn build:ios

# - name: Archive build artifacts
# if: success()
# uses: actions/upload-artifact@v3
# with:
# name: ci-detox-ios-artifacts-libs-${{ github.sha }}
# path: wrappers/react-native/ios/lib
# retention-days: 1

# ios:
# name: Detox iOS E2E Testing
# needs: [libraries]
# runs-on: macos-latest
# # strategy:
# # matrix:
# # runners: [[self-hosted, macos, general, detox-ios]]
# # concurrency:
# # group: ci-detox-ios-${{ matrix.runners }}-${{ github.head_ref || github.run_id }}
# # cancel-in-progress: true
# timeout-minutes: 120

# defaults:
# run:
# working-directory: wrappers/react-native
# shell: zsh -il {0} # load ~/.zshrc

# env:
# DEVELOPER_DIR: /Applications/Xcode_14.2.app
# NODE_OPTIONS: "--max-old-space-size=5120"
# # Do not launch packager during CI build
# RCT_NO_LAUNCH_PACKAGER: 'true'

# steps:
# - name: Checkout
# uses: actions/checkout@v2

# - name: Setup Node
# uses: actions/setup-node@v3
# with:
# node-version: 18.x
# registry-url: https://registry.npmjs.org

# - name: Download iOS Libraries
# uses: actions/download-artifact@v3
# with:
# name: ci-detox-ios-artifacts-libs-${{ github.sha }}
# path: wrappers/react-native/ios/lib

# - name: Inspect iOS Libraries
# run: ls -R ios/lib

# - name: Install Dependencies
# run: yarn install --frozen-lockfile

# - name: Example App Install Dependencies
# run: yarn example --frozen-lockfile

# - name: Example App Install Pods
# run: yarn example pods

# - run: brew tap wix/brew
# - run: brew install applesimutils

# - name: Detox Build iOS Configuration
# run: yarn detox:build:ios

# - name: Detox E2E Test
# run: yarn detox:ios:ci

# - name: Archive detox failed test results
# if: failure()
# uses: actions/upload-artifact@v3
# with:
# name: detox-artifacts-${{ github.sha }}
# path: wrappers/react-native/example/detox-artifacts
# retention-days: 1
name: ci-detox-ios

on:
pull_request:
# TODO: Re-add once PR is complete
# branches:
# - master

jobs:
libraries:
name: Build Wrapper Libraries
runs-on: macos-latest
defaults:
run:
working-directory: ./wrappers/react-native
steps:
- name: Checkout
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # [email protected]

- name: Setup rust toolchain
uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # [email protected]
with:
profile: minimal
toolchain: stable
override: true

- name: Build Libraries for iOS
run: yarn build:ios

- name: Archive build artifacts
if: success()
uses: actions/upload-artifact@v3
with:
name: ci-detox-ios-artifacts-libs-${{ github.sha }}
path: wrappers/react-native/ios/lib
retention-days: 1

ios:
name: Detox iOS E2E Testing
needs: [libraries]
runs-on: macos-latest
# strategy:
# matrix:
# runners: [[self-hosted, macos, general, detox-ios]]
# concurrency:
# group: ci-detox-ios-${{ matrix.runners }}-${{ github.head_ref || github.run_id }}
# cancel-in-progress: true
timeout-minutes: 120

defaults:
run:
working-directory: wrappers/react-native
shell: zsh -il {0} # load ~/.zshrc

env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app
NODE_OPTIONS: "--max-old-space-size=5120"
# Do not launch packager during CI build
RCT_NO_LAUNCH_PACKAGER: "true"

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org

- name: Download iOS Libraries
uses: actions/download-artifact@v3
with:
name: ci-detox-ios-artifacts-libs-${{ github.sha }}
path: wrappers/react-native/ios/lib

- name: Inspect iOS Libraries
run: ls -R ios/lib

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Example App Install Dependencies
run: yarn example --frozen-lockfile

- name: Example App Install Pods
run: yarn example pods

- run: brew tap wix/brew
- run: brew install applesimutils

- name: Detox Build iOS Configuration
run: yarn detox:build:ios

- name: Detox E2E Test
run: yarn detox:ios:ci

- name: Archive detox failed test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: detox-artifacts-${{ github.sha }}
path: wrappers/react-native/example/detox-artifacts
retention-days: 1

0 comments on commit 8532502

Please sign in to comment.