-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (72 loc) · 1.89 KB
/
ci.yaml
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
79
80
81
82
83
84
85
86
87
88
name: CI for React Native
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
setup-environment:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install
- name: Cache Node Modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
lint:
runs-on: ubuntu-latest
needs: setup-environment
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Run ESLint
run: npm run lint
unit-tests:
runs-on: ubuntu-latest
needs: setup-environment
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Run Unit Tests
run: npm test -- --coverage
android-build:
runs-on: ubuntu-latest
needs: setup-environment
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Install Android SDK
uses: android-actions/setup-android@v3
- name: Build Android
run: |
cd android
./gradlew assembleDebug
ios-build:
runs-on: macos-latest
needs: setup-environment
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install CocoaPods Dependencies
run: |
cd ios
pod install
- name: Build iOS
run: xcodebuild -workspace ios/YourApp.xcworkspace -scheme YourApp -sdk iphonesimulator -configuration Debug build