appium_lib 16.3.0 → 16.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/Gemfile +1 -2
- data/appium_lib.gemspec +6 -0
- data/lib/appium_lib/android/common/helper.rb +3 -3
- data/lib/appium_lib/appium.rb +5 -5
- data/lib/appium_lib/common/helper.rb +1 -1
- data/lib/appium_lib/driver.rb +2 -1
- data/lib/appium_lib/version.rb +2 -2
- data/readme.md +5 -0
- data/test/regression_test.rb +132 -0
- metadata +4 -14
- data/.github/CODEOWNERS +0 -1
- data/.github/ISSUE_TEMPLATE.md +0 -21
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -17
- data/.github/dependabot.yml +0 -14
- data/.github/workflows/functional-test.yml +0 -170
- data/.github/workflows/pr-title.yml +0 -10
- data/.github/workflows/rubocop.yml +0 -29
- data/Thorfile +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b1aa9e62b11df7b31d2b0cb2da08780e251b052b82a59b741811a611f00aaf8d
|
|
4
|
+
data.tar.gz: ecab8df07b2745d0d6d996b8e3a3a32c840834ca84eed2e8dd4daa318915d278
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd9cbd2131d41a2ea9399d8f7b3b232783f15d975c75acd117158d99913044f7926ddbbccf06936eafa57e8cc6512e6eff50cb2b54436512acd6698a75969b11
|
|
7
|
+
data.tar.gz: e42e614ede8d46d494dfef431ecc2f983e969bf22d70b2b39f6402ce2789f5ec6165b244a8ec06cdf1f1dabfa0eeb1a01ce9d497c9da93ab92521d2bd4f3d292
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
# Changelogs
|
|
2
|
-
|
|
2
|
+
Historical commit-level release notes are in [release_notes.md](./release_notes.md).
|
|
3
|
+
New entries are maintained by Release Please.
|
|
3
4
|
|
|
4
5
|
Release tags are https://github.com/appium/ruby_lib/releases .
|
|
5
6
|
|
|
7
|
+
## [16.3.1](https://github.com/appium/ruby_lib/compare/v16.3.0...v16.3.1) (2026-09-13)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* issues in code ([#1124](https://github.com/appium/ruby_lib/issues/1124)) ([1fc98b8](https://github.com/appium/ruby_lib/commit/1fc98b89cf41284c7da83df214aed6d8764429c2))
|
|
13
|
+
|
|
6
14
|
## [16.3.0] - 2026-05-11
|
|
7
15
|
- Bump appium_lib_core to 13+
|
|
8
16
|
- No user facing changes are expected.
|
data/Gemfile
CHANGED
|
@@ -15,11 +15,10 @@
|
|
|
15
15
|
source 'https://rubygems.org'
|
|
16
16
|
gemspec
|
|
17
17
|
|
|
18
|
-
gem 'appium_thor', '~> 2.0'
|
|
19
18
|
gem 'hashdiff', '~> 1.2.0'
|
|
20
19
|
gem 'minitest', '~> 5.0'
|
|
21
20
|
gem 'minitest-reporters', '~> 1.1'
|
|
22
21
|
gem 'pry'
|
|
23
22
|
gem 'rake', '~> 13.0'
|
|
24
|
-
gem 'rubocop', '1.
|
|
23
|
+
gem 'rubocop', '1.90.0'
|
|
25
24
|
gem 'yard', '~> 0.9.11'
|
data/appium_lib.gemspec
CHANGED
|
@@ -19,4 +19,10 @@ Gem::Specification.new do |s|
|
|
|
19
19
|
|
|
20
20
|
s.files = `git ls-files`.split("\n").reject { |v| v.match(/\A^(ios_tests|android_tests|grid|test_apps)\/.+/) }
|
|
21
21
|
s.metadata['rubygems_mfa_required'] = 'true'
|
|
22
|
+
# Keep release automation out of the published package.
|
|
23
|
+
s.files.reject! do |file|
|
|
24
|
+
file.start_with?('.github/', 'script/', 'test/release/') ||
|
|
25
|
+
%w[RELEASING.md release-please-config.json .release-please-manifest.json].include?(file)
|
|
26
|
+
end
|
|
27
|
+
|
|
22
28
|
end
|
|
@@ -29,12 +29,12 @@ module Appium
|
|
|
29
29
|
|
|
30
30
|
def initialize # rubocop:disable Lint/MissingSuper
|
|
31
31
|
reset
|
|
32
|
-
@filter
|
|
32
|
+
@filter = false
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def reset
|
|
36
|
-
@result
|
|
37
|
-
@keys
|
|
36
|
+
@result = ''
|
|
37
|
+
@keys = %w(text resource-id content-desc)
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
# http://nokogiri.org/Nokogiri/XML/SAX/Document.html
|
data/lib/appium_lib/appium.rb
CHANGED
|
@@ -110,7 +110,7 @@ module Appium
|
|
|
110
110
|
# @return [Array] list of require files as an array, nil if require doesn't exist
|
|
111
111
|
def expand_required_files(base_dir, file_paths)
|
|
112
112
|
# ensure files are absolute
|
|
113
|
-
Array(file_paths).map
|
|
113
|
+
file_paths = Array(file_paths).map do |f|
|
|
114
114
|
file = File.exist?(f) ? f : File.join(base_dir, f)
|
|
115
115
|
file = File.expand_path file
|
|
116
116
|
|
|
@@ -171,10 +171,10 @@ module Appium
|
|
|
171
171
|
# override unless there's an existing method with matching arity
|
|
172
172
|
next if const.respond_to?(m) && const.method(m).arity == driver.method(m).arity
|
|
173
173
|
|
|
174
|
-
const.send(:define_singleton_method, m) do |*args, &block|
|
|
175
|
-
super(*args, &block) # promote.rb
|
|
174
|
+
const.send(:define_singleton_method, m) do |*args, **kwargs, &block|
|
|
175
|
+
super(*args, **kwargs, &block) # promote.rb
|
|
176
176
|
rescue NoMethodError, ArgumentError
|
|
177
|
-
driver.send m, *args, &block if driver.respond_to?(m)
|
|
177
|
+
driver.send m, *args, **kwargs, &block if driver.respond_to?(m)
|
|
178
178
|
end
|
|
179
179
|
end
|
|
180
180
|
end
|
|
@@ -219,7 +219,7 @@ module Appium
|
|
|
219
219
|
# https://github.com/appium/ruby_lib/issues/917
|
|
220
220
|
|
|
221
221
|
# Remove the method before adding it.
|
|
222
|
-
remove_method method if
|
|
222
|
+
remove_method method if instance_methods(false).include? method
|
|
223
223
|
|
|
224
224
|
define_method method do |*args, &block|
|
|
225
225
|
# Prefer existing method.
|
|
@@ -276,7 +276,7 @@ module Appium
|
|
|
276
276
|
doc = if source.start_with? '<html'
|
|
277
277
|
Nokogiri::HTML(source) { |cfg| cfg.options = opts }
|
|
278
278
|
else
|
|
279
|
-
Nokogiri::XML(source)
|
|
279
|
+
Nokogiri::XML(source) { |cfg| cfg.options = opts }
|
|
280
280
|
end
|
|
281
281
|
puts doc.to_xml indent: 2
|
|
282
282
|
end
|
data/lib/appium_lib/driver.rb
CHANGED
|
@@ -564,7 +564,8 @@ module Appium
|
|
|
564
564
|
# @option http_client_ops [Hash] :read_timeout Custom read timeout for http client.
|
|
565
565
|
# @return [Selenium::WebDriver] the new global driver
|
|
566
566
|
def start_driver(http_client_ops = { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
|
|
567
|
-
|
|
567
|
+
http_client = http_client_ops[:http_client]
|
|
568
|
+
if http_client.nil?
|
|
568
569
|
http_client = ::Appium::Http::Default.new(open_timeout: http_client_ops[:open_timeout],
|
|
569
570
|
read_timeout: http_client_ops[:read_timeout])
|
|
570
571
|
end
|
data/lib/appium_lib/version.rb
CHANGED
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
module Appium
|
|
16
16
|
# Version and Date are defined on the 'Appium' module, not 'Appium::Common'
|
|
17
|
-
VERSION = '16.3.
|
|
18
|
-
DATE = '2026-
|
|
17
|
+
VERSION = '16.3.1' unless defined? ::Appium::VERSION
|
|
18
|
+
DATE = '2026-09-13' unless defined? ::Appium::DATE # x-release-please-date
|
|
19
19
|
end
|
data/readme.md
CHANGED
|
@@ -99,3 +99,8 @@ This repository has examples for running tests in parallel. Read [ios_tests](htt
|
|
|
99
99
|
|
|
100
100
|
## How to add new helpful methods
|
|
101
101
|
- Add the new methods in this library
|
|
102
|
+
|
|
103
|
+
## Releasing
|
|
104
|
+
|
|
105
|
+
Review and merge the Release Please PR to publish. See [RELEASING.md](RELEASING.md)
|
|
106
|
+
for one-time Trusted Publishing setup and recovery instructions.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'minitest/autorun'
|
|
4
|
+
require 'appium_lib'
|
|
5
|
+
require 'tmpdir'
|
|
6
|
+
|
|
7
|
+
class RegressionTest < Minitest::Test
|
|
8
|
+
def test_expand_single_required_file
|
|
9
|
+
Dir.mktmpdir do |dir|
|
|
10
|
+
path = File.join(dir, 'helper.rb')
|
|
11
|
+
File.write(path, '')
|
|
12
|
+
|
|
13
|
+
assert_equal [path], Appium.expand_required_files(dir, 'helper.rb')
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def test_expand_required_directory_and_skip_missing_files
|
|
18
|
+
Dir.mktmpdir do |dir|
|
|
19
|
+
nested = File.join(dir, 'helpers')
|
|
20
|
+
Dir.mkdir(nested)
|
|
21
|
+
path = File.join(nested, 'helper.rb')
|
|
22
|
+
File.write(path, '')
|
|
23
|
+
File.write(File.join(nested, 'notes.txt'), '')
|
|
24
|
+
|
|
25
|
+
assert_equal [path], Appium.expand_required_files(dir, %w(helpers missing.rb))
|
|
26
|
+
assert_empty Appium.expand_required_files(dir, 'missing.rb')
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def test_promote_preserves_inherited_method
|
|
31
|
+
parent = Class.new do
|
|
32
|
+
def back
|
|
33
|
+
:inherited
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
child = Class.new(parent)
|
|
37
|
+
driver = Object.new
|
|
38
|
+
def driver.back
|
|
39
|
+
:driver
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
Appium.promote_appium_methods(child, driver)
|
|
43
|
+
|
|
44
|
+
assert_equal :inherited, child.new.back
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def test_promote_again_uses_new_driver
|
|
48
|
+
target = Class.new
|
|
49
|
+
first = Object.new
|
|
50
|
+
def first.back
|
|
51
|
+
:first
|
|
52
|
+
end
|
|
53
|
+
second = Object.new
|
|
54
|
+
def second.back
|
|
55
|
+
:second
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
Appium.promote_appium_methods(target, first)
|
|
59
|
+
assert_equal :first, target.new.back
|
|
60
|
+
Appium.promote_appium_methods(target, second)
|
|
61
|
+
assert_equal :second, target.new.back
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def test_singleton_promotion_forwards_keywords_and_block
|
|
65
|
+
driver = Object.new
|
|
66
|
+
def driver.log_event(vendor:, event:)
|
|
67
|
+
yield [vendor, event]
|
|
68
|
+
end
|
|
69
|
+
target = Module.new
|
|
70
|
+
Appium.promote_singleton_appium_methods([target], driver)
|
|
71
|
+
|
|
72
|
+
result = target.log_event(vendor: 'test', event: 'event') { |values| values.join(':') }
|
|
73
|
+
|
|
74
|
+
assert_equal 'test:event', result
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def test_singleton_promotion_preserves_positional_hash
|
|
78
|
+
driver = Object.new
|
|
79
|
+
def driver.command(options)
|
|
80
|
+
options
|
|
81
|
+
end
|
|
82
|
+
target = Module.new
|
|
83
|
+
Appium.promote_singleton_appium_methods([target], driver)
|
|
84
|
+
|
|
85
|
+
assert_equal({ value: 1 }, target.command({ value: 1 }))
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
class RecordingCore
|
|
89
|
+
attr_reader :http_client
|
|
90
|
+
|
|
91
|
+
def automation_name
|
|
92
|
+
:uiautomator2
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def start_driver(http_client_ops:, **)
|
|
96
|
+
@http_client = http_client_ops[:http_client]
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def appium_server_version
|
|
101
|
+
{}
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def test_start_driver_passes_custom_http_client
|
|
106
|
+
client = Object.new
|
|
107
|
+
driver = build_driver
|
|
108
|
+
|
|
109
|
+
driver.start_driver(http_client: client)
|
|
110
|
+
|
|
111
|
+
assert_same client, driver.http_client
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def test_start_driver_builds_default_http_client
|
|
115
|
+
driver = build_driver
|
|
116
|
+
|
|
117
|
+
driver.start_driver
|
|
118
|
+
|
|
119
|
+
assert_instance_of Appium::Http::Default, driver.http_client
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
private
|
|
123
|
+
|
|
124
|
+
def build_driver
|
|
125
|
+
driver = Appium::Driver.allocate
|
|
126
|
+
driver.instance_variable_set(:@core, RecordingCore.new)
|
|
127
|
+
def driver.server_url
|
|
128
|
+
'http://127.0.0.1:4723'
|
|
129
|
+
end
|
|
130
|
+
driver
|
|
131
|
+
end
|
|
132
|
+
end
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appium_lib
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 16.3.
|
|
4
|
+
version: 16.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- code@bootstraponline.com
|
|
8
8
|
- Kazuaki Matsuo
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: appium_lib_core
|
|
@@ -79,20 +78,12 @@ executables: []
|
|
|
79
78
|
extensions: []
|
|
80
79
|
extra_rdoc_files: []
|
|
81
80
|
files:
|
|
82
|
-
- ".github/CODEOWNERS"
|
|
83
|
-
- ".github/ISSUE_TEMPLATE.md"
|
|
84
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
85
|
-
- ".github/dependabot.yml"
|
|
86
|
-
- ".github/workflows/functional-test.yml"
|
|
87
|
-
- ".github/workflows/pr-title.yml"
|
|
88
|
-
- ".github/workflows/rubocop.yml"
|
|
89
81
|
- ".gitignore"
|
|
90
82
|
- ".rubocop.yml"
|
|
91
83
|
- CHANGELOG.md
|
|
92
84
|
- Gemfile
|
|
93
85
|
- LICENSE-2.0.txt
|
|
94
86
|
- Rakefile
|
|
95
|
-
- Thorfile
|
|
96
87
|
- appium_lib.gemspec
|
|
97
88
|
- contributing.md
|
|
98
89
|
- docs/android_uiautomator.md
|
|
@@ -157,12 +148,12 @@ files:
|
|
|
157
148
|
- readme.md
|
|
158
149
|
- release_notes.md
|
|
159
150
|
- test/first_test.rb
|
|
151
|
+
- test/regression_test.rb
|
|
160
152
|
homepage: https://github.com/appium/ruby_lib
|
|
161
153
|
licenses:
|
|
162
154
|
- Apache-2.0
|
|
163
155
|
metadata:
|
|
164
156
|
rubygems_mfa_required: 'true'
|
|
165
|
-
post_install_message:
|
|
166
157
|
rdoc_options: []
|
|
167
158
|
require_paths:
|
|
168
159
|
- lib
|
|
@@ -177,8 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
177
168
|
- !ruby/object:Gem::Version
|
|
178
169
|
version: '0'
|
|
179
170
|
requirements: []
|
|
180
|
-
rubygems_version:
|
|
181
|
-
signing_key:
|
|
171
|
+
rubygems_version: 4.0.16
|
|
182
172
|
specification_version: 4
|
|
183
173
|
summary: Ruby library for Appium
|
|
184
174
|
test_files: []
|
data/.github/CODEOWNERS
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* @KazuCocoa
|
data/.github/ISSUE_TEMPLATE.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
## This is a
|
|
2
|
-
* [ ] Bug report
|
|
3
|
-
* [ ] Question
|
|
4
|
-
* [ ] Freature Request
|
|
5
|
-
|
|
6
|
-
## Summary
|
|
7
|
-
|
|
8
|
-
## Environment
|
|
9
|
-
* Appium version (or git revision):
|
|
10
|
-
* `ruby_lib` version:
|
|
11
|
-
* Mobile platform/version/device under test:
|
|
12
|
-
|
|
13
|
-
## Actual behaviour and steps to reproduce
|
|
14
|
-
|
|
15
|
-
## Expected behaviour
|
|
16
|
-
|
|
17
|
-
## Link to Appium/Ruby logs
|
|
18
|
-
|
|
19
|
-
Create a [GIST](https://gist.github.com) which is a paste of your _full_ Appium logs, and link them here.
|
|
20
|
-
|
|
21
|
-
## Any additional comments
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Summary
|
|
2
|
-
|
|
3
|
-
Please include a summary of the change and which issue is fixed.
|
|
4
|
-
Please also include relevant motivation and context.
|
|
5
|
-
|
|
6
|
-
Closes # (issue)
|
|
7
|
-
|
|
8
|
-
# How Has This Been Tested?
|
|
9
|
-
|
|
10
|
-
Please describe the tests that you ran to verify your changes. If the change has test code, it can be alternative.
|
|
11
|
-
|
|
12
|
-
- [ ] Test A
|
|
13
|
-
- [ ] Test B
|
|
14
|
-
|
|
15
|
-
# Checklist
|
|
16
|
-
|
|
17
|
-
- [ ] `bundle exec rake rubocop`
|
data/.github/dependabot.yml
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: bundler
|
|
4
|
-
directory: "/"
|
|
5
|
-
schedule:
|
|
6
|
-
interval: weekly
|
|
7
|
-
time: "11:00"
|
|
8
|
-
open-pull-requests-limit: 10
|
|
9
|
-
- package-ecosystem: github-actions
|
|
10
|
-
directory: "/"
|
|
11
|
-
schedule:
|
|
12
|
-
interval: weekly
|
|
13
|
-
time: "11:00"
|
|
14
|
-
open-pull-requests-limit: 10
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
name: Functional Tests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
# Run by manual at this time
|
|
5
|
-
workflow_dispatch:
|
|
6
|
-
push:
|
|
7
|
-
branches: [ master ]
|
|
8
|
-
pull_request:
|
|
9
|
-
branches: [ master ]
|
|
10
|
-
|
|
11
|
-
concurrency:
|
|
12
|
-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
13
|
-
cancel-in-progress: true
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
ios_test:
|
|
17
|
-
runs-on: macos-15
|
|
18
|
-
timeout-minutes: 90
|
|
19
|
-
env:
|
|
20
|
-
XCODE_VERSION: 16.4
|
|
21
|
-
IOS_VERSION: 18.5
|
|
22
|
-
IOS_DEVICE_NAME: iPhone 16 Plus
|
|
23
|
-
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v6
|
|
26
|
-
|
|
27
|
-
- name: Install Node.js
|
|
28
|
-
uses: actions/setup-node@v6
|
|
29
|
-
with:
|
|
30
|
-
node-version: 'lts/*'
|
|
31
|
-
|
|
32
|
-
- name: Select Xcode
|
|
33
|
-
uses: maxim-lobanov/setup-xcode@v1
|
|
34
|
-
with:
|
|
35
|
-
xcode-version: ${{ env.XCODE_VERSION }}
|
|
36
|
-
- run: defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false
|
|
37
|
-
|
|
38
|
-
- uses: futureware-tech/simulator-action@v5
|
|
39
|
-
with:
|
|
40
|
-
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
|
|
41
|
-
model: ${{ env.IOS_DEVICE_NAME }}
|
|
42
|
-
os_version: ${{ env.IOS_VERSION }}
|
|
43
|
-
|
|
44
|
-
- name: Preparing other environment
|
|
45
|
-
run: |
|
|
46
|
-
brew install ffmpeg
|
|
47
|
-
brew tap wix/brew
|
|
48
|
-
brew install applesimutils
|
|
49
|
-
|
|
50
|
-
# Start Appium
|
|
51
|
-
- name: Install appium and mjpeg-consumer
|
|
52
|
-
run: |
|
|
53
|
-
npm install -g appium
|
|
54
|
-
npm install -g mjpeg-consumer
|
|
55
|
-
- run: |
|
|
56
|
-
appium driver install xcuitest
|
|
57
|
-
appium plugin install images
|
|
58
|
-
appium plugin install execute-driver
|
|
59
|
-
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors > appium.log &
|
|
60
|
-
|
|
61
|
-
- run: |
|
|
62
|
-
npx appium driver run xcuitest download-wda-sim --platform=ios --outdir=${{ github.workspace }}/wda
|
|
63
|
-
name: Downloading prebuilt WDA
|
|
64
|
-
|
|
65
|
-
- name: Set up Ruby
|
|
66
|
-
uses: ruby/setup-ruby@v1
|
|
67
|
-
with:
|
|
68
|
-
ruby-version: 4.0
|
|
69
|
-
- run: |
|
|
70
|
-
bundle install
|
|
71
|
-
bundle exec rake ios
|
|
72
|
-
name: Run tests
|
|
73
|
-
timeout-minutes: 60
|
|
74
|
-
working-directory: ios_tests
|
|
75
|
-
env:
|
|
76
|
-
LOCAL_PREBUILT_WDA: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app
|
|
77
|
-
|
|
78
|
-
- name: Save server output
|
|
79
|
-
if: ${{ always() }}
|
|
80
|
-
uses: actions/upload-artifact@master
|
|
81
|
-
with:
|
|
82
|
-
name: appium-ios_test_with_other_deps.log
|
|
83
|
-
path: |
|
|
84
|
-
appium.log
|
|
85
|
-
test/report/
|
|
86
|
-
|
|
87
|
-
android_test:
|
|
88
|
-
runs-on: ubuntu-latest
|
|
89
|
-
timeout-minutes: 90
|
|
90
|
-
env:
|
|
91
|
-
API_LEVEL: 35
|
|
92
|
-
ARCH: x86_64
|
|
93
|
-
|
|
94
|
-
steps:
|
|
95
|
-
- uses: actions/checkout@v6
|
|
96
|
-
|
|
97
|
-
- name: Set up Java
|
|
98
|
-
uses: actions/setup-java@v5
|
|
99
|
-
with:
|
|
100
|
-
distribution: temurin
|
|
101
|
-
java-version: '17'
|
|
102
|
-
|
|
103
|
-
- name: Install Node.js
|
|
104
|
-
uses: actions/setup-node@v6
|
|
105
|
-
with:
|
|
106
|
-
node-version: 'lts/*'
|
|
107
|
-
|
|
108
|
-
- name: Set up Ruby
|
|
109
|
-
uses: ruby/setup-ruby@v1
|
|
110
|
-
with:
|
|
111
|
-
ruby-version: 4.0
|
|
112
|
-
|
|
113
|
-
- name: Install appium
|
|
114
|
-
run: |
|
|
115
|
-
npm install -g appium
|
|
116
|
-
npm install -g mjpeg-consumer
|
|
117
|
-
|
|
118
|
-
- name: Start appium
|
|
119
|
-
run: |
|
|
120
|
-
appium driver install uiautomator2
|
|
121
|
-
appium plugin install images
|
|
122
|
-
appium plugin install execute-driver
|
|
123
|
-
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors > appium.log &
|
|
124
|
-
|
|
125
|
-
- name: Enable KVM group perms
|
|
126
|
-
run: |
|
|
127
|
-
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
|
128
|
-
sudo udevadm control --reload-rules
|
|
129
|
-
sudo udevadm trigger --name-match=kvm
|
|
130
|
-
|
|
131
|
-
- name: AVD cache
|
|
132
|
-
uses: actions/cache@v5
|
|
133
|
-
id: avd-cache
|
|
134
|
-
with:
|
|
135
|
-
path: |
|
|
136
|
-
~/.android/avd/*
|
|
137
|
-
~/.android/adb*
|
|
138
|
-
key: avd-${{ env.API_LEVEL }}
|
|
139
|
-
|
|
140
|
-
- name: Create AVD snapshot for cache
|
|
141
|
-
if: steps.avd-cache.outputs.cache-hit != 'true'
|
|
142
|
-
uses: reactivecircus/android-emulator-runner@v2
|
|
143
|
-
with:
|
|
144
|
-
api-level: ${{ env.API_LEVEL }}
|
|
145
|
-
arch: ${{ env.ARCH }}
|
|
146
|
-
target: google_apis
|
|
147
|
-
force-avd-creation: false
|
|
148
|
-
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
|
149
|
-
disable-animations: false
|
|
150
|
-
script: echo "Generated AVD snapshot for caching."
|
|
151
|
-
|
|
152
|
-
- name: run tests
|
|
153
|
-
uses: reactivecircus/android-emulator-runner@v2
|
|
154
|
-
with:
|
|
155
|
-
api-level: ${{ env.API_LEVEL }}
|
|
156
|
-
arch: ${{ env.ARCH }}
|
|
157
|
-
script: cd android_tests;bundle install;bundle exec rake --tasks;bundle exec rake android
|
|
158
|
-
target: google_apis
|
|
159
|
-
profile: Nexus 5X
|
|
160
|
-
disable-spellchecker: true
|
|
161
|
-
disable-animations: true
|
|
162
|
-
|
|
163
|
-
- name: Save server output
|
|
164
|
-
if: ${{ always() }}
|
|
165
|
-
uses: actions/upload-artifact@master
|
|
166
|
-
with:
|
|
167
|
-
name: appium-android_test_with_other_deps.log
|
|
168
|
-
path: |
|
|
169
|
-
appium.log
|
|
170
|
-
test/report/
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
name: rubocop
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [ master ]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [ master ]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
test:
|
|
11
|
-
strategy:
|
|
12
|
-
fail-fast: false
|
|
13
|
-
matrix:
|
|
14
|
-
ruby: [3.1, 3.2, 3.3]
|
|
15
|
-
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v6
|
|
20
|
-
- name: Set up Ruby
|
|
21
|
-
uses: ruby/setup-ruby@v1
|
|
22
|
-
with:
|
|
23
|
-
ruby-version: ${{ matrix.ruby }}
|
|
24
|
-
- name: Install dependencies
|
|
25
|
-
run: bundle install
|
|
26
|
-
- name: Run rubocop
|
|
27
|
-
run: bundle exec rake rubocop
|
|
28
|
-
- name: Run tests
|
|
29
|
-
run: bundle exec rake test
|