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
12 changes: 7 additions & 5 deletions .github/workflows/unitTestsiOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Build and test
run: |
cd ios
xcodebuild clean build test -workspace RNMagicScript.xcworkspace -scheme RNMagicScriptHostApplication -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -derivedDataPath Build/ -enableCodeCoverage YES
xcodebuild clean build test -workspace RNMagicScript.xcworkspace -scheme RNMagicScriptHostApplication -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -derivedDataPath Build/ -enableCodeCoverage YES | xcpretty --test --color
env:
destination: ${{ matrix.destination }}
- name: Code Coverage
Expand All @@ -28,13 +28,15 @@ jobs:
run: |
gem install slather
cd ios
slather coverage --html --scheme RNMagicScriptHostApplication --workspace ./RNMagicScript.xcworkspace --build-directory Build ./RNMagicScript.xcodeproj
slather
slather coverage -g --scheme RNMagicScriptHostApplication --workspace ./RNMagicScript.xcworkspace --build-directory Build ./RNMagicScript.xcodeproj
slather coverage --json --output-directory coverage_report --scheme RNMagicScriptHostApplication --workspace ./RNMagicScript.xcworkspace --build-directory Build ./RNMagicScript.xcodeproj
mv .gutter.json coverage_report/gutter.json
- uses: actions/upload-artifact@master
with:
name: code-coverage-artifact-ios
path: ios/html
path: ios/coverage_report
- name: Codecov update
run: |
cd ios
slather coverage -x --output-directory xml --scheme RNMagicScriptHostApplication --workspace ./RNMagicScript.xcworkspace --build-directory Build ./RNMagicScript.xcodeproj
bash <(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_TOKEN}} -f xml/covertura.xml
bash <(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_TOKEN}} -f coverage_report/covertura.xml
11 changes: 11 additions & 0 deletions ios/.slather.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# .slather.yml

coverage_service: cobertura_xml
xcodeproj: ./RNMagicScript.xcodeproj
xcworkspace: ./RNMagicScript.xcworkspace
scheme: RNMagicScriptHostApplication
source_directory: ./RNMagicScript
build_directory: ./Build
output_directory: ./coverage_report
ignore:
- ./RNMagicScript/*.{h,m}
2 changes: 2 additions & 0 deletions ios/RNMagicScript.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,7 @@
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_CODE_COVERAGE = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
Expand Down Expand Up @@ -2298,6 +2299,7 @@
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_CODE_COVERAGE = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
</Testables>
<MacroExpansion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
</Testables>
<AdditionalOptions>
Expand Down