From 4bdef186f8eec752d52ddd71fb145dd4c3aeb98c Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Thu, 17 Aug 2023 00:01:45 +0100 Subject: [PATCH] Restore Fastlane lanes --- fastlane/Fastfile | 37 ++++++++++++++++++++++++++++++++++++- fastlane/README.md | 32 ++++++++++++++++++++++++++++++++ fastlane/Scanfile | 4 ++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 fastlane/Scanfile diff --git a/fastlane/Fastfile b/fastlane/Fastfile index acde84c2..a914cf1a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -6,6 +6,41 @@ platform :ios do setup_circle_ci if defined? setup_circle_ci end + desc "Run code linter" + lane :lint do + swiftlint( + mode: :lint, + config_file: '.swiftlint.yml', + reporter: 'emoji', + raise_if_swiftlint_error: true + ) + end + + desc "Runs all the tests" + lane :test do |options| + scheme = options[:scheme] + device = options[:device] + scan( + scheme: scheme, + device: device, + clean: true, + skip_build: true, + code_coverage: true + ) + end + + desc "Cocoapods library lint" + lane :pod_lint do + pod_lib_lint(verbose: false, allow_warnings: true, platforms: 'ios,osx,tvos') + end + + desc "Runs all the tests in a CI environment" + lane :ci do + # TODO: Run rest of platforms + lint + test + end + desc "Tags the release and pushes the Podspec to CocoaPods" lane :release do perform_release target: 'Auth0.iOS' @@ -39,4 +74,4 @@ platform :ios do File.write("#{docs_dir}/index.html", redirect_file) end end -end +end \ No newline at end of file diff --git a/fastlane/README.md b/fastlane/README.md index 2a95c969..43d4b875 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -15,6 +15,38 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do ## iOS +### ios lint + +```sh +[bundle exec] fastlane ios lint +``` + +Run code linter + +### ios test + +```sh +[bundle exec] fastlane ios test +``` + +Runs all the tests + +### ios pod_lint + +```sh +[bundle exec] fastlane ios pod_lint +``` + +Cocoapods library lint + +### ios ci + +```sh +[bundle exec] fastlane ios ci +``` + +Runs all the tests in a CI environment + ### ios release ```sh diff --git a/fastlane/Scanfile b/fastlane/Scanfile new file mode 100644 index 00000000..dfba332f --- /dev/null +++ b/fastlane/Scanfile @@ -0,0 +1,4 @@ +scheme "Auth0.iOS" +devices ["iPhone 14"] + +clean true