-
Notifications
You must be signed in to change notification settings - Fork 9
122 lines (115 loc) · 3.1 KB
/
Copy pathpull-request.yml
File metadata and controls
122 lines (115 loc) · 3.1 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
name: Build and Test
on: [workflow_dispatch, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
checks: write
id-token: write
jobs:
js-test:
name: JS Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./plugin
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout Branch
uses: actions/checkout@v6.0.3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6.4.0
with:
node-version: ${{ matrix.node-version }}
- name: "NPM Build"
run: npm ci; npm run build --if-present
- name: "NPM Test"
run: npm test
android-test:
name: Android Unit Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./plugin
steps:
- name: Checkout Branch
uses: actions/checkout@v6.0.3
- name: "Install JDK 17"
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 17
- name: Install NPM
uses: actions/setup-node@v6.4.0
- name: NPM Build
run: |
npm ci
npm run build --if-present
- name: Run Unit Tests
run: ./gradlew test
example-android:
name: Build Example Android App
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./example
steps:
- name: Checkout Branch
uses: actions/checkout@v6.0.3
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 17
- name: Setup Node.js
uses: actions/setup-node@v6.4.0
with:
node-version: 22
- name: Install Cordova
run: npm install -g cordova
- name: Install Dependencies
run: npm ci
- name: Add Android Platform
run: cordova platform add android
- name: Build Android
run: cordova build android
example-ios:
name: Build Example iOS App
runs-on: macos-15
defaults:
run:
working-directory: ./example
steps:
- name: Checkout Branch
uses: actions/checkout@v6.0.3
- name: Setup Node.js
uses: actions/setup-node@v6.4.0
with:
node-version: 22
- name: Select Xcode Version
run: sudo xcode-select -s /Applications/Xcode_16.4.app
- name: Install Cordova
run: npm install -g cordova
- name: Install Dependencies
run: npm ci
- name: Add iOS Platform
run: cordova platform add ios
- name: Build iOS
run: cordova build ios --verbose
pr-notify:
if: >
github.event_name == 'pull_request' &&
github.event.pull_request.draft == false
needs:
- js-test
- android-test
- example-android
- example-ios
name: Notify GChat
uses: ROKT/rokt-workflows/.github/workflows/oss_pr_opened_notification.yml@main
secrets:
gchat_webhook: ${{ secrets.GCHAT_PRS_WEBHOOK }}