mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-14 23:53:33 +08:00
chore: setup detox for iOS
This commit is contained in:
70
.github/workflows/main.yml
vendored
Normal file
70
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
name: Detox (iOS)
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macOS-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_11.2.app
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Use Node.js 10
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
|
||||
- name: Get Yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- name: Cache Yarn packages
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: ${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
||||
run: yarn --frozen-lockfile
|
||||
|
||||
- name: Cache Pods
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: example/ios/Pods
|
||||
key: pods-${{ hashFiles('**/Podfile.lock') }}
|
||||
|
||||
- name: Update Pods
|
||||
run: |
|
||||
gem update cocoapods xcodeproj
|
||||
cd example/ios
|
||||
pod install
|
||||
|
||||
- name: Configure dependencies
|
||||
run: |
|
||||
brew tap wix/brew
|
||||
brew install applesimutils
|
||||
yarn global add detox-cli
|
||||
|
||||
- name: Cache Detox build
|
||||
uses: actions/cache@v1
|
||||
id: detox-cache
|
||||
with:
|
||||
path: example/ios/build
|
||||
key: detox-build-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/Podfile.lock') }}
|
||||
|
||||
- name: Build Detox
|
||||
if: steps.detox-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd example
|
||||
detox build --configuration ios.sim.release
|
||||
|
||||
- name: Run Detox tests
|
||||
run: |
|
||||
cd example
|
||||
detox test --configuration ios.sim.release --cleanup --debug-synchronization 200
|
||||
Reference in New Issue
Block a user