-
-
Notifications
You must be signed in to change notification settings - Fork 184
156 lines (134 loc) · 4.02 KB
/
driver-function.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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Run quick functionality check
on:
workflow_dispatch:
push:
paths:
- 'driver/**'
branches: [ main ]
pull_request:
paths:
- 'driver/**'
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ios_test:
runs-on: macos-14
env:
XCODE_VERSION: 15.3
IOS_DEVICE_NAME: iPhone 15 Plus
IOS_VERSION: 17.4
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- run: defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false
- uses: futureware-tech/simulator-action@v3
with:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
model: ${{ env.IOS_DEVICE_NAME }}
os_version: ${{ env.IOS_VERSION }}
# Start Appium
- run: npm install -g appium
- run: |
npm install
nohup appium --log-timestamp --log-no-colors > appium.log &
working-directory:
driver
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- name: Install dependencies
run: bundle install
working-directory: example/ruby
- name: Run tests
run: ruby example_sample2_ios.rb
working-directory: example/ruby
- name: Save server output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium-ios.log
path: driver/appium.log
android_test:
runs-on: ubuntu-latest
env:
API_LEVEL: 34
ARCH: x86_64
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
# Start Appium
- run: npm install -g appium
- run: |
npm install
nohup appium --log-timestamp --log-no-colors > appium.log &
working-directory:
driver
- 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
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ env.API_LEVEL }}
- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.API_LEVEL }}
arch: ${{ env.ARCH }}
target: google_apis
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- name: Install dependencies
run: bundle install
working-directory: example/ruby
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.API_LEVEL }}
arch: ${{ env.ARCH }}
script: ruby example/ruby/example_sample2.rb
target: google_apis
profile: Nexus 5X
disable-spellchecker: true
disable-animations: true
env:
ANDROID_SDK_VERSION: ${{ env.API_LEVEL }}
APPIUM_DRIVER: ${{matrix.test_targets.automation_name}}
IGNORE_VERSION_SKIP: true
CI: true
- name: Save server output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium-android.log
path: driver/appium.log