-
Notifications
You must be signed in to change notification settings - Fork 27
97 lines (80 loc) · 2.34 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
test-ios:
name: "iOS Tests"
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up example app
run: |
npm i
npx cordova prepare ios
working-directory: ./example
- name: Run iOS Unit Tests
run: |
xcodebuild test -quiet \
-project OAuthPluginTests.xcodeproj \
-scheme OAuthPluginTests \
-testPlan UnitTests \
-destination "platform=iOS Simulator,name=iPhone 15"
working-directory: ./tests/ios
- name: Run iOS UI Tests
run: |
xcodebuild test \
-project OAuthPluginTests.xcodeproj \
-scheme OAuthPluginTests \
-testPlan DeviceTests \
-destination "platform=iOS Simulator,name=iPhone 15" \
-destination-timeout 300
working-directory: ./tests/ios
test-android:
name: "Android Tests"
runs-on: ubuntu-latest
steps:
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Use Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Set up example app
run: |
npm i
npx cordova prepare android
working-directory: ./example
- name: Set up gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.4
- name: Run Android Unit Tests
run: |
gradle test
working-directory: ./tests/android
- name: Run Android UI Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: gradle connectedCheck
working-directory: ./tests/android