forked from pinpong/react-native-google-maps-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (114 loc) · 3.22 KB
/
pull_request.yml
File metadata and controls
142 lines (114 loc) · 3.22 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Pull Request Validation
on:
pull_request:
branches: [dev, main]
concurrency:
group: pr-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Generate nitrogen code
run: yarn nitrogen
- name: Install ktlint & swiftlint
run: |
brew install ktlint
brew install swiftlint
- name: Lint files
run: yarn lint
- name: Typecheck files
run: yarn typecheck
test:
runs-on: ubuntu-latest
needs: [lint]
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage
docs:
runs-on: ubuntu-latest
needs: [lint]
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Generate nitrogen code
run: yarn nitrogen
- name: Build docs
run: yarn docs
build-android:
runs-on: ubuntu-latest
needs: [lint, test, docs]
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Generate nitrogen code
run: yarn nitrogen
- name: Install JDK
uses: actions/setup-java@v5.0.0
with:
distribution: 'zulu'
java-version: '17'
- name: Finalize Android SDK
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Cache Gradle
uses: actions/cache@v4.3.0
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Create secrets.properties
run: |
echo MAPS_API_KEY="API_KEY" >> example/android/secrets.properties
- name: Build example for Android
env:
JAVA_OPTS: '-XX:MaxHeapSize=6g'
run: yarn build:android
build-ios:
runs-on: macos-latest
needs: [lint, test, docs]
env:
XCODE_VERSION: '26.0.1'
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Generate nitrogen code
run: yarn nitrogen
- name: Use appropriate Xcode version
uses: maxim-lobanov/setup-xcode@v1.6.0
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Install cocoapods
working-directory: example
run: yarn ios:pods
- name: Create Secrets.xcconfig
run: echo MAPS_API_KEY="API_KEY" >> example/ios/Secrets.xcconfig
- name: Build example for iOS
run: yarn build:ios