Skip to content

Commit e8031d1

Browse files
authored
ci: drop azure (#565)
* drop azure completely * add wait and update the scale strictly * tweak * another try * skip on CI * drip azure completely * tune artifact
1 parent 8f6bca9 commit e8031d1

12 files changed

+30
-161
lines changed

.github/workflows/functional-test.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ jobs:
8787
uses: actions/upload-artifact@master
8888
with:
8989
name: appium-ios-${{matrix.test_targets.name}}.log
90-
path: appium.log
90+
path: |
91+
appium.log
92+
test/report/
9193
9294
ios_test_with_other_deps:
9395
runs-on: macos-14
@@ -147,7 +149,9 @@ jobs:
147149
uses: actions/upload-artifact@master
148150
with:
149151
name: appium-ios_test_with_other_deps.log
150-
path: appium.log
152+
path: |
153+
appium.log
154+
test/report/
151155
152156
android_test:
153157
runs-on: ubuntu-latest
@@ -180,10 +184,12 @@ jobs:
180184
- target: test/functional/android/android/device_data_test.rb
181185
automation_name: espresso
182186
name: test8
183-
184-
# Some may not work well on GHA. Haven't fully fixed.
185-
# test/functional/android/android/mjpeg_server_test.rb
186-
# test/functional/android/android/image_comparison_test.rb
187+
- target: test/functional/android/android/mjpeg_server_test.rb,test/functional/android/android/image_comparison_test.rb
188+
automation_name: uiautomator2
189+
name: test9
190+
- target: test/functional/android/android/mjpeg_server_test.rb,test/functional/android/android/image_comparison_test.rb
191+
automation_name: espresso
192+
name: test10
187193

188194
env:
189195
API_LEVEL: 34
@@ -267,4 +273,6 @@ jobs:
267273
uses: actions/upload-artifact@master
268274
with:
269275
name: appium-android-${{matrix.test_targets.automation_name}}-${{matrix.test_targets.name}}.log
270-
path: appium.log
276+
path: |
277+
appium.log
278+
test/report/

.github/workflows/unittest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Runs lint and unit tests
1+
name: lint and unit tests
22

33
on:
44
push:

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
[![Gem Version](https://badge.fury.io/rb/appium_lib_core.svg)](https://badge.fury.io/rb/appium_lib_core)
44

5-
[![Build Status](https://dev.azure.com/AppiumCI/Appium%20CI/_apis/build/status/appium.ruby_lib_core?branchName=master)](https://dev.azure.com/AppiumCI/Appium%20CI/_build/latest?definitionId=54&branchName=master)
5+
[![Runs lint and unit tests](https://github.com/appium/ruby_lib_core/actions/workflows/unittest.yml/badge.svg)](https://github.com/appium/ruby_lib_core/actions/workflows/unittest.yml)
6+
[![Functional Tests](https://github.com/appium/ruby_lib_core/actions/workflows/functional-test.yml/badge.svg)](https://github.com/appium/ruby_lib_core/actions/workflows/functional-test.yml)
7+
68

79
This library is a Ruby client for Appium. The gem is available via [appium_lib_core](https://rubygems.org/gems/appium_lib_core).
810

azure-pipelines.yml

-34
This file was deleted.

ci-jobs/functional/android_setup.yml

-3
This file was deleted.

ci-jobs/functional/publish_test_result.yml

-18
This file was deleted.

ci-jobs/functional/run_appium.yml

-38
This file was deleted.

ci-jobs/functional/start-emulator.sh

-26
This file was deleted.

ci-jobs/functional_test.yml

-30
This file was deleted.

test/functional/android/android/image_comparison_test.rb

+11-3
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ def test_image_element
100100
el = @driver.find_element :accessibility_id, 'NFC'
101101
@driver.save_element_screenshot el, 'test/functional/data/test_android_nfc.png'
102102

103-
image_element = @driver.find_element_by_image AppiumLibCoreTest.path_of('test/functional/data/test_android_nfc.png')
103+
image_element = @driver.wait do |d|
104+
d.find_element_by_image AppiumLibCoreTest.path_of('test/functional/data/test_android_nfc.png')
105+
end
104106

105107
assert image_element.inspect
106108
assert image_element.hash
@@ -198,6 +200,10 @@ def test_image_elements
198200

199201
# tested only Android side since the logic is the same in cross platform
200202
def test_template_scale_ratio
203+
# Skip on CI since Ci env is unstable to complete this scale test.
204+
# Local env succeeded in running this test.
205+
skip 'skip because image search with scale is unstable on CI' if ci?
206+
201207
skip_as_appium_version '1.9.0'
202208
skip 'Espresso does not support settings API' if @@core.automation_name == :espresso
203209

@@ -210,11 +216,13 @@ def test_template_scale_ratio
210216
{
211217
defaultImageTemplateScale: 4,
212218
imageMatchThreshold: 0.7,
213-
checkForImageElementStaleness: false
219+
checkForImageElementStaleness: true
214220
}
215221
)
216222

217-
image_element = @driver.find_element_by_image AppiumLibCoreTest.path_of('test/functional/data/test_android_nfc_270.png')
223+
image_element = @driver.wait do |d|
224+
d.find_element_by_image AppiumLibCoreTest.path_of('test/functional/data/test_android_nfc_scale.png')
225+
end
218226
assert image_element.inspect
219227
assert image_element.hash
220228
assert image_element.id =~ /\Aappium-image-element-[a-z0-9\-]+/
-1.43 KB
Binary file not shown.
1.76 KB
Loading

0 commit comments

Comments
 (0)