Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ gem 'nokogiri'

### Fastlane Plugins

# gem 'fastlane-plugin-wpmreleasetoolkit', '~> 6.0'
gem 'fastlane-plugin-wpmreleasetoolkit', '~> 6.0'
#gem 'fastlane-plugin-wpmreleasetoolkit', path: '../../release-toolkit'
gem 'fastlane-plugin-wpmreleasetoolkit', git: 'https://github.com/wordpress-mobile/release-toolkit', branch: 'firebase-test-return-url'
#gem 'fastlane-plugin-wpmreleasetoolkit', git: 'https://github.com/wordpress-mobile/release-toolkit', branch: ''


### Gems needed only for generating Promo Screenshots
Expand Down
52 changes: 23 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
GIT
remote: https://github.com/wordpress-mobile/release-toolkit
revision: d1eff864aed7a7f8a0b3a9da3cb0323373416c2f
branch: firebase-test-return-url
specs:
fastlane-plugin-wpmreleasetoolkit (6.0.0)
activesupport (~> 5)
bigdecimal (~> 1.4)
buildkit (~> 1.5)
chroma (= 0.2.0)
diffy (~> 3.3)
git (~> 1.3)
google-cloud-storage (~> 1.31)
jsonlint (~> 0.3)
nokogiri (~> 1.11)
octokit (~> 4.18)
parallel (~> 1.14)
plist (~> 3.1)
progress_bar (~> 1.3)
rake (>= 12.3, < 14.0)
rake-compiler (~> 1.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -138,13 +116,29 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-wpmreleasetoolkit (6.0.0)
activesupport (~> 5)
bigdecimal (~> 1.4)
buildkit (~> 1.5)
chroma (= 0.2.0)
diffy (~> 3.3)
git (~> 1.3)
google-cloud-storage (~> 1.31)
jsonlint (~> 0.3)
nokogiri (~> 1.11)
octokit (~> 4.18)
parallel (~> 1.14)
plist (~> 3.1)
progress_bar (~> 1.3)
rake (>= 12.3, < 14.0)
rake-compiler (~> 1.0)
gh_inspector (1.1.3)
git (1.12.0)
addressable (~> 2.8)
rchardet (~> 1.8)
google-apis-androidpublisher_v3 (0.26.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-core (0.9.1)
google-apis-core (0.9.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
Expand All @@ -153,8 +147,8 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.16.0)
google-apis-core (>= 0.9.1, < 2.a)
google-apis-iamcredentials_v1 (0.15.0)
google-apis-core (>= 0.9.0, < 2.a)
google-apis-playcustomapp_v1 (0.10.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-storage_v1 (0.19.0)
Expand All @@ -165,15 +159,15 @@ GEM
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.0)
google-cloud-storage (1.44.0)
google-cloud-storage (1.43.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.19.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.3.0)
googleauth (1.2.0)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand Down Expand Up @@ -201,7 +195,7 @@ GEM
multipart-post (2.0.0)
nanaimo (0.3.0)
naturally (2.2.1)
nokogiri (1.13.9)
nokogiri (1.13.8)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
octokit (4.25.1)
Expand Down Expand Up @@ -280,7 +274,7 @@ PLATFORMS

DEPENDENCIES
fastlane (~> 2)
fastlane-plugin-wpmreleasetoolkit!
fastlane-plugin-wpmreleasetoolkit (~> 6.0)
nokogiri
rmagick (~> 4.1)

Expand Down
40 changes: 16 additions & 24 deletions fastlane/lanes/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,25 @@
#####################################################################################
desc "Build the application and instrumented tests, then run the tests in Firebase Test Lab"
lane :build_and_run_instrumented_test do | options |
gradle(tasks: ['WordPress:assembleWordPressVanillaDebug', 'WordPress:assembleWordPressVanillaDebugAndroidTest'])
gradle(tasks: ['WordPress:assembleWordPressVanillaDebug', 'WordPress:assembleWordPressVanillaDebugAndroidTest'])

# Run the instrumented tests in Firebase Test Lab
firebase_login(
key_file: GOOGLE_FIREBASE_SECRETS_PATH
)
# Run the instrumented tests in Firebase Test Lab
firebase_login(
key_file: GOOGLE_FIREBASE_SECRETS_PATH
)

apk_dir = File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'build', 'outputs', 'apk')
apk_dir = File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'build', 'outputs', 'apk')

test_succeeded = android_firebase_test(
project_id: firebase_secret(name: 'project_id'),
key_file: GOOGLE_FIREBASE_SECRETS_PATH,
model: 'Pixel2.arm',
version: 30,
test_apk_path: File.join(apk_dir, 'androidTest', 'wordpressVanilla', 'debug', 'org.wordpress.android-wordpress-vanilla-debug-androidTest.apk'),
apk_path: File.join(apk_dir, 'wordpressVanilla', 'debug', 'org.wordpress.android-wordpress-vanilla-debug.apk'),
test_targets: 'notPackage org.wordpress.android.ui.screenshots',
results_output_dir: File.join(PROJECT_ROOT_FOLDER, 'build', 'instrumented-tests'),
crash_on_test_failure: false
)

unless test_succeeded
details_url = lane_context[SharedValues::FIREBASE_TEST_MORE_DETAILS_URL]
message = "Firebase Tests failed. Failure details can be seen [here in Firebase Console](#{details_url})"
sh('buildkite-agent', 'annotate', message, '--style', 'error', '--context', 'firebase-test-wordpress-vanilla-debug') if is_ci?
UI.test_failure!(message)
end
android_firebase_test(
project_id: firebase_secret(name: 'project_id'),
key_file: GOOGLE_FIREBASE_SECRETS_PATH,
model: 'Pixel2.arm',
version: 30,
test_apk_path: File.join(apk_dir, 'androidTest', 'wordpressVanilla', 'debug', 'org.wordpress.android-wordpress-vanilla-debug-androidTest.apk'),
apk_path: File.join(apk_dir, 'wordpressVanilla', 'debug', 'org.wordpress.android-wordpress-vanilla-debug.apk'),
test_targets: 'notPackage org.wordpress.android.ui.screenshots',
results_output_dir: File.join(PROJECT_ROOT_FOLDER, 'build', 'instrumented-tests')
)
end
end

Expand Down