forked from expo/expo
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (75 loc) · 2.36 KB
/
ios-unit-tests.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
68
69
70
71
72
73
74
75
76
77
78
name: iOS Unit Tests
on:
workflow_dispatch: {}
pull_request:
paths:
- .github/workflows/ios-unit-tests.yml
- ios/**
- packages/**/ios/**
- tools/src/dynamic-macros/**
- tools/src/commands/IosGenerateDynamicMacros.ts
- tools/src/commands/IosNativeUnitTests.ts
- tools/src/commands/NativeUnitTests.ts
- secrets/**
- fastlane/**
- Gemfile.lock
- .ruby-version
- '!packages/@expo/cli/**'
push:
branches: [main]
paths:
- .github/workflows/ios-unit-tests.yml
- ios/**
- packages/**/ios/**
- tools/src/dynamic-macros/**
- tools/src/commands/IosGenerateDynamicMacros.ts
- tools/src/commands/IosNativeUnitTests.ts
- tools/src/commands/NativeUnitTests.ts
- secrets/**
- fastlane/**
- Gemfile.lock
- .ruby-version
- '!packages/@expo/cli/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: macos-11
timeout-minutes: 60
steps:
- name: 👀 Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: 🔨 Switch to Xcode 13.2.1
run: sudo xcode-select --switch /Applications/Xcode_13.2.1.app
- name: 🔓 Decrypt secrets if possible
uses: ./.github/actions/expo-git-decrypt
with:
key: ${{ secrets.GIT_CRYPT_KEY_BASE64 }}
- name: ➕ Add `bin` to GITHUB_PATH
run: echo "$(pwd)/bin" >> $GITHUB_PATH
- name: 💎 Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: ♻️ Restore caches
uses: ./.github/actions/expo-caches
id: expo-caches
with:
yarn-workspace: 'true'
yarn-tools: 'true'
native-tests-pods: 'true'
- name: 🧶 Yarn install
if: steps.expo-caches.outputs.yarn-workspace-hit != 'true'
run: yarn install --frozen-lockfile
- name: 🥥 Install CocoaPods in `apps/native-tests/ios`
if: steps.expo-caches.outputs.bare-expo-pods-hit != 'true'
run: pod install
working-directory: apps/native-tests/ios
- name: 🧪 Run native iOS unit tests
timeout-minutes: 45
env:
FASTLANE_SKIP_UPDATE_CHECK: '1'
run: expotools native-unit-tests --platform ios