-
-
Notifications
You must be signed in to change notification settings - Fork 1k
115 lines (115 loc) · 3.36 KB
/
platform-validation.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: platform-validation
on:
push:
branches: [main]
paths-ignore: ['docs/**']
pull_request:
branches: [main, 'feature/**']
paths-ignore: ['docs/**']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install Library Dependencies
run: yarn install --frozen-lockfile
- name: Build Library
run: yarn build
- name: Install Mobile Dependencies
run: |-
cd example
yarn install
- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Build App
run: |-
cd example/android
./gradlew assembleDebug --no-daemon
build-ios:
runs-on: macos-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.0'
bundler-cache: false
- name: Install Library Dependencies
run: yarn install --frozen-lockfile
- name: Build Library
run: yarn build
- name: Install Example Dependencies
run: |-
cd example
yarn install --frozen-lockfile
- name: Bundler
run: |-
cd example/ios
bundle install
- name: Cache Cocoapods Dependencies
uses: actions/cache@v2
with:
path: example/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Cococapods
run: |-
cd example/ios
bundle exec pod install
- name: Build App
run: |-
cd example/ios
xcodebuild build -workspace RNTPExample.xcworkspace -scheme RNTPExample -destination 'platform=iOS Simulator,name=iPhone 12 Pro'
check-typescript:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install Dependencies
run: |-
yarn install --frozen-lockfile
- name: Install Example Dependencies
run: |-
cd example
yarn install --frozen-lockfile
- name: Check Lint, Format & Types
run: |
yarn run ci:lint
yarn run ci:format
yarn run types
- name: Example - Check Lint, Format & Types
run: |
cd example
yarn run ci:lint
yarn run ci:format
yarn run types