From bce0595996d37944e8108104687348cb9d834cb9 Mon Sep 17 00:00:00 2001 From: "Tzouvaras, Stilianos" Date: Fri, 31 May 2024 14:03:58 +0300 Subject: [PATCH] New Lane for running all unit tests --- fastlane/Fastfile | 19 +++++++++++++++---- fastlane/README.md | 14 +++++++++++--- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index fb506dd5..2760c794 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,8 +18,19 @@ require "date" default_platform(:android) platform :android do - desc "Build Wallet and upload it to appcenter" + desc "Runs all the unit tests" + lane :tests do + + # Run tests + gradle(task: "clean") + gradle(task: "test#{ENV["APP_BUILD_TYPE"]}DebugUnitTest") + + # Clean Artifacts + clean_build_artifacts + end + + desc "Build Wallet and upload it to appcenter" lane :deploy do git_pull @@ -59,7 +70,7 @@ platform :android do clean_build_artifacts reset_versioncode - reset_versionname + reset_versionName add_git_tag( tag: tagVersion, @@ -144,7 +155,7 @@ platform :android do end desc "Set versionName back to default yyyy.d.m" - lane :reset_versionname do + lane :reset_versionName do set_properties_value( path: "version.properties", key: "VERSION_NAME", @@ -152,7 +163,7 @@ platform :android do ) end - desc "Build Version" + desc "Build VersionName based on CalVer" lane :calver do |values| buildCode = values[:buildCode] date = DateTime.now diff --git a/fastlane/README.md b/fastlane/README.md index d230ad81..ddaf2ced 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -15,6 +15,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do ## Android +### android tests + +```sh +[bundle exec] fastlane android tests +``` + +Runs all the unit tests + ### android deploy ```sh @@ -71,10 +79,10 @@ Get version version From Project Set versionCode back to default 1 -### android reset_versionname +### android reset_versionName ```sh -[bundle exec] fastlane android reset_versionname +[bundle exec] fastlane android reset_versionName ``` Set versionName back to default yyyy.d.m @@ -85,7 +93,7 @@ Set versionName back to default yyyy.d.m [bundle exec] fastlane android calver ``` -Build Version +Build VersionName based on CalVer ----