Skip to content

Commit 9524846

Browse files
chore: add workflow for main and PR (#1498)
* add workflow for main and PR Co-authored-by: Saikrishna321 <[email protected]> * Run test on PR without submodules Co-authored-by: SrinivasanTarget <[email protected]> * Try again Co-authored-by: SrinivasanTarget <[email protected]> * Try again Co-authored-by: SrinivasanTarget <[email protected]> --------- Co-authored-by: Saikrishna321 <[email protected]>
1 parent 878f5b7 commit 9524846

File tree

2 files changed

+228
-1
lines changed

2 files changed

+228
-1
lines changed

.github/workflows/prtest.yml

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
name: PR-CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
buildWithSubmodule:
8+
name: Run Unit Test
9+
runs-on: macos-latest
10+
strategy:
11+
matrix:
12+
node: [20]
13+
14+
steps:
15+
- name: Checkout repository with submodules
16+
uses: actions/checkout@v3
17+
- name: Setup Java
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: 'temurin'
21+
java-version: 17
22+
23+
- name: Setup Android SDK
24+
uses: android-actions/[email protected]
25+
- name: Run script
26+
run: |
27+
# Add your script commands here
28+
npm ci
29+
npm run bundle
30+
- name: Run Unit Test
31+
run: |
32+
# Add your script commands here
33+
npm test
34+
HubWithNoPlatform:
35+
name: Run E2E Plugin Test
36+
runs-on: ubuntu-latest
37+
strategy:
38+
matrix:
39+
node: [20]
40+
41+
steps:
42+
- name: Checkout repository with submodules
43+
uses: actions/checkout@v3
44+
- name: Build
45+
run: |
46+
# Add your script commands here
47+
npm ci
48+
npm run bundle
49+
- name: Run E2E Plugin Test without Platform
50+
run: |
51+
# Add your script commands here
52+
npm run test-e2e
53+
54+
buildWithOutSubmodule:
55+
name: Build with Out Submodule
56+
runs-on: macos-latest
57+
strategy:
58+
matrix:
59+
node: [20]
60+
61+
steps:
62+
- name: Checkout repository with out submodule
63+
uses: actions/checkout@v3
64+
- name: Run script
65+
run: |
66+
npm ci
67+
npm run bundle
68+
AndroidIntegrationTest:
69+
name: Run Android Integration Test
70+
runs-on: ubuntu-latest
71+
strategy:
72+
matrix:
73+
api-level: [29]
74+
target: [google_apis]
75+
steps:
76+
- name: checkout
77+
uses: actions/checkout@v4
78+
- name: Build
79+
run: |
80+
npm ci
81+
npm run bundle
82+
83+
- name: Enable KVM
84+
run: |
85+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
86+
sudo udevadm control --reload-rules
87+
sudo udevadm trigger --name-match=kvm
88+
89+
- name: run tests
90+
uses: reactivecircus/android-emulator-runner@v2
91+
with:
92+
api-level: ${{ matrix.api-level }}
93+
target: ${{ matrix.target }}
94+
arch: x86_64
95+
profile: Nexus 6
96+
script: npm run integration-android
97+
E2EHubAndNodeTest:
98+
name: Run E2EHubAndNodeTest
99+
runs-on: ubuntu-latest
100+
strategy:
101+
matrix:
102+
api-level: [ 29 ]
103+
target: [ google_apis ]
104+
steps:
105+
- name: checkout
106+
uses: actions/checkout@v4
107+
- name: Build
108+
run: |
109+
npm ci
110+
npm run bundle
111+
112+
- name: Enable KVM
113+
run: |
114+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
115+
sudo udevadm control --reload-rules
116+
sudo udevadm trigger --name-match=kvm
117+
118+
- name: run tests
119+
uses: reactivecircus/android-emulator-runner@v2
120+
with:
121+
api-level: ${{ matrix.api-level }}
122+
target: ${{ matrix.target }}
123+
arch: x86_64
124+
profile: Nexus 6
125+
script: npm run test-e2e-hubnode
126+
IOSIntegrationTest:
127+
name: Run iOS Integration Test
128+
runs-on: macos-latest
129+
strategy:
130+
matrix:
131+
node: [ 20 ]
132+
133+
steps:
134+
- name: Checkout repository with submodules
135+
uses: actions/checkout@v3
136+
- name: Build
137+
run: |
138+
npm ci
139+
npm run bundle
140+
- name: Run iOS Integration Test
141+
run: |
142+
npm run integration-ios
143+
144+
145+
146+
147+
E2EPluginTest:
148+
name: Run Plugin Test
149+
runs-on: macos-latest
150+
strategy:
151+
matrix:
152+
node: [ 20 ]
153+
154+
steps:
155+
- name: Checkout repository with submodules
156+
uses: actions/checkout@v3
157+
- name: Build
158+
run: |
159+
npm ci
160+
npm run bundle
161+
- name: Run e2e plugin Test
162+
run: |
163+
npm run test-e2e
164+
- name: Run E2E BrowserStack Test
165+
run: |
166+
npm run test-e2e-browserstack
167+
- name: Run E2E PCloudy Test
168+
run: |
169+
npm run test-e2e-pcloudy
170+
171+
BrowserStackTest:
172+
runs-on: macos-latest
173+
strategy:
174+
matrix:
175+
node: [ 20 ]
176+
177+
steps:
178+
- name: Checkout repository with submodules
179+
uses: actions/checkout@v3
180+
- name: Build
181+
run: |
182+
npm ci
183+
npm run bundle
184+
- name: Run BrowserStack Test
185+
run: |
186+
CLOUD_USERNAME=${{ secrets.BS_USERNAME }} CLOUD_KEY=${{ secrets.BS_PASSWORD }} BS_ANDROID_CLOUD_APP=${{ secrets.BS_ANDROID_CLOUD_APP }} npm run test-parallel-bs
187+
BrowserStackTest_Linux:
188+
runs-on: ubuntu-latest
189+
strategy:
190+
matrix:
191+
node: [ 20 ]
192+
steps:
193+
- name: Checkout repository with submodules
194+
uses: actions/checkout@v3
195+
- name: Setup Java
196+
uses: actions/setup-java@v3
197+
with:
198+
distribution: 'temurin'
199+
java-version: 17
200+
201+
- name: Setup Android SDK
202+
uses: android-actions/[email protected]
203+
- name: Build
204+
run: |
205+
npm ci
206+
npm run bundle
207+
- name: Run BrowserStack Test
208+
run: |
209+
CLOUD_USERNAME=${{ secrets.BS_USERNAME }} CLOUD_KEY=${{ secrets.BS_PASSWORD }} BS_IOS_CLOUD_APP=${{ secrets.BS_IOS_CLOUD_APP }} npm run test-parallel-ios-bs
210+
LambdaTest:
211+
runs-on: macos-latest
212+
strategy:
213+
matrix:
214+
node: [ 20 ]
215+
216+
steps:
217+
- name: Checkout repository with submodules
218+
uses: actions/checkout@v3
219+
- name: Build
220+
run: |
221+
npm ci
222+
npm run bundle
223+
- name: Run LT Test
224+
run: |
225+
CLOUD_USERNAME=${{ secrets.LT_USERNAME }} CLOUD_KEY=${{ secrets.LT_PASSWORD }} LT_CLOUD_APP=${{ secrets.LT_CLOUD_APP }} npm run test-parallel-lt

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: CI
22

33
on:
4-
pull_request:
4+
push:
5+
branches:
6+
- main
57

68
jobs:
79
buildWithSubmodule:

0 commit comments

Comments
 (0)