Skip to content

Commit

Permalink
[Chore] Fix Danger
Browse files Browse the repository at this point in the history
  • Loading branch information
blyscuit committed Dec 17, 2022
1 parent f58f730 commit 9c8b861
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 23 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/ios_review_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,22 @@ jobs:
gem --version
bundler --version
- name: Cache Gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Generate KMM frameworks for Cocoapods
run: |
cd ..
./gradlew generateDummyFramework
- name: Cache Pods
uses: actions/cache@v2
id: cocoapodCache
Expand All @@ -82,8 +98,8 @@ jobs:
- name: Install Pods Dependencies
run: bundle exec pod install

# - name: Build and Test
# run: bundle exec fastlane build_and_test
- name: Build and Test
run: bundle exec fastlane build_and_test

- name: Run iOS Danger
uses: MeilCli/danger-action@v5
Expand Down
42 changes: 21 additions & 21 deletions iosApp/Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ swiftlint.lint_files(
additional_swiftlint_args: '--strict'
)

# xcresultPath = "iosApp/#{Constants.TEST_OUTPUT_DIRECTORY_PATH}/#{Constants.TESTS_SCHEME}.xcresult"
xcresultPath = "iosApp/#{Constants.TEST_OUTPUT_DIRECTORY_PATH}/#{Constants.TESTS_SCHEME}.xcresult"

# Xcode summary
# changed_files = (git.modified_files - git.deleted_files) + git.added_files
# xcode_summary.ignored_results { |result|
# if result.location
# not changed_files.include?(result.location.file_path)
# else
# true
# end
# }
# xcode_summary.ignored_files = 'iosApp/Pods/**'
# xcode_summary.inline_mode = true
# xcode_summary.report xcresultPath
changed_files = (git.modified_files - git.deleted_files) + git.added_files
xcode_summary.ignored_results { |result|
if result.location
not changed_files.include?(result.location.file_path)
else
true
end
}
xcode_summary.ignored_files = 'iosApp/Pods/**'
xcode_summary.inline_mode = true
xcode_summary.report xcresultPath

# # Xcov
# xcov.report(
# scheme: Constants.TESTS_SCHEME,
# workspace: "iosApp/#{Constants.WORKSPACE_PATH}",
# output_directory: "iosApp/#{Constants.XCOV_OUTPUT_DIRECTORY_PATH}",
# xccov_file_direct_path: xcresultPath,
# only_project_targets: true,
# markdown_report: true,
# html_report: false
# )
xcov.report(
scheme: Constants.TESTS_SCHEME,
workspace: "iosApp/#{Constants.WORKSPACE_PATH}",
output_directory: "iosApp/#{Constants.XCOV_OUTPUT_DIRECTORY_PATH}",
xccov_file_direct_path: xcresultPath,
only_project_targets: true,
markdown_report: true,
html_report: false
)
5 changes: 5 additions & 0 deletions iosApp/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ target 'Survey' do
pod 'SwiftLint'
pod 'Wormholy', :configurations => ['Debug Staging', 'Debug Production']

# KMM
platform :ios, '14.0'
pod 'Shared', :path => '../shared'
pod 'KMPNativeCoroutinesCombine', '0.12.6'

target 'SurveyTests' do
inherit! :search_paths
testing_pods
Expand Down
2 changes: 2 additions & 0 deletions iosApp/SurveyTests/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
disabled_rules:
- function_body_length
2 changes: 2 additions & 0 deletions iosApp/SurveyUITests/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
disabled_rules:
- function_body_length

0 comments on commit 9c8b861

Please sign in to comment.