diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index da2f08dec..000000000 --- a/.codecov.yml +++ /dev/null @@ -1,12 +0,0 @@ -coverage: - ignore: - - Parse/Tests/.* - - ParseTwitterUtils/Tests/.* - - ParseFacebookUtils/Tests/.* - status: - patch: true - changes: false - project: - default: - target: 74 -comment: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7872e6056..f50bfa7ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,23 +68,30 @@ jobs: run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake ${{ matrix.script }} env: DEVELOPER_DIR: ${{ (matrix.script == 'package:release' && env.CI_XCODE_11) || env.CI_XCODE_14 }} - - name: Get Artifact Name + - name: Generate Environment Variables if: ${{ always() }} env: ARTIFACT_NAME: ${{ matrix.script }}-logs + TEST_RESULTS: ${{ matrix.script }}.xcresult run: | ARTIFACT_NAME=${{ env.ARTIFACT_NAME }} + TEST_RESULTS=$(find ~/Library/Developer/Xcode/DerivedData -name "*.xcresult") echo ARTIFACT_NAME=${ARTIFACT_NAME//:/-} >> $GITHUB_ENV # replace colon with dashes + echo TEST_RESULTS=${TEST_RESULTS} >> $GITHUB_ENV + echo "Artifact Name: $ARTIFACT_NAME" + echo "Test Result Location: $TEST_RESULTS" - name: Upload Artifact Logs - if: ${{ always() }} + if: ${{ failure() }} uses: actions/upload-artifact@v3 with: name: ${{ env.ARTIFACT_NAME }} path: | - ~/Library/Logs/DiagnosticReports ~/Library/Developer/Xcode/DerivedData/Parse-*/Logs/Test - - name: Send Codecov - run: bash <(curl https://codecov.io/bash) + - name: Upload Coverage + uses: codecov/codecov-action@v3.1.1 + with: + xcode: true + xcode_archive_path: ${{ env.TEST_RESULTS }} docs: runs-on: macos-12 steps: diff --git a/.gitignore b/.gitignore index 1be672962..50d9a3bc8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .DS_Store ## Build generated +.build/ build/ DerivedData OCMock.framework diff --git a/Parse/Parse.xcodeproj/project.pbxproj b/Parse/Parse.xcodeproj/project.pbxproj index c3cfeb45f..82e7d358d 100644 --- a/Parse/Parse.xcodeproj/project.pbxproj +++ b/Parse/Parse.xcodeproj/project.pbxproj @@ -8860,7 +8860,7 @@ baseConfigurationReference = 81DCD1491D2DA080002501A2 /* Debug.xcconfig */; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ENABLE_CODE_COVERAGE = NO; + CLANG_ENABLE_CODE_COVERAGE = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_INFINITE_RECURSION = YES; diff --git a/ParseFacebookUtils/ParseFacebookUtils.xcodeproj/project.pbxproj b/ParseFacebookUtils/ParseFacebookUtils.xcodeproj/project.pbxproj index b74f47c28..32a89a12c 100644 --- a/ParseFacebookUtils/ParseFacebookUtils.xcodeproj/project.pbxproj +++ b/ParseFacebookUtils/ParseFacebookUtils.xcodeproj/project.pbxproj @@ -901,7 +901,7 @@ baseConfigurationReference = 8121EAAB1D39862400AC0B02 /* Debug.xcconfig */; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ENABLE_CODE_COVERAGE = NO; + CLANG_ENABLE_CODE_COVERAGE = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_INFINITE_RECURSION = YES; diff --git a/ParseFacebookUtils/ParseFacebookUtils.xcodeproj/xcshareddata/xcschemes/ParseFacebookUtilsV4-iOS.xcscheme b/ParseFacebookUtils/ParseFacebookUtils.xcodeproj/xcshareddata/xcschemes/ParseFacebookUtilsV4-iOS.xcscheme index 9ea8da839..8f2f22dc5 100644 --- a/ParseFacebookUtils/ParseFacebookUtils.xcodeproj/xcshareddata/xcschemes/ParseFacebookUtilsV4-iOS.xcscheme +++ b/ParseFacebookUtils/ParseFacebookUtils.xcodeproj/xcshareddata/xcschemes/ParseFacebookUtilsV4-iOS.xcscheme @@ -26,7 +26,8 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> diff --git a/ParseFacebookUtilsTvOs/ParseFacebookUtilsTvOS.xcodeproj/project.pbxproj b/ParseFacebookUtilsTvOs/ParseFacebookUtilsTvOS.xcodeproj/project.pbxproj index a61d9a574..40ab4e115 100644 --- a/ParseFacebookUtilsTvOs/ParseFacebookUtilsTvOS.xcodeproj/project.pbxproj +++ b/ParseFacebookUtilsTvOs/ParseFacebookUtilsTvOS.xcodeproj/project.pbxproj @@ -672,7 +672,7 @@ baseConfigurationReference = 8121EAAB1D39862400AC0B02 /* Debug.xcconfig */; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ENABLE_CODE_COVERAGE = NO; + CLANG_ENABLE_CODE_COVERAGE = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_INFINITE_RECURSION = YES; diff --git a/ParseFacebookUtilsiOS/ParseFacebookUtilsiOS.xcodeproj/project.pbxproj b/ParseFacebookUtilsiOS/ParseFacebookUtilsiOS.xcodeproj/project.pbxproj index 2c58877dc..2817a801f 100644 --- a/ParseFacebookUtilsiOS/ParseFacebookUtilsiOS.xcodeproj/project.pbxproj +++ b/ParseFacebookUtilsiOS/ParseFacebookUtilsiOS.xcodeproj/project.pbxproj @@ -1078,7 +1078,7 @@ baseConfigurationReference = 8121EAAB1D39862400AC0B02 /* Debug.xcconfig */; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ENABLE_CODE_COVERAGE = NO; + CLANG_ENABLE_CODE_COVERAGE = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_INFINITE_RECURSION = YES; diff --git a/ParseTwitterUtils/ParseTwitterUtils.xcodeproj/project.pbxproj b/ParseTwitterUtils/ParseTwitterUtils.xcodeproj/project.pbxproj index 5e48b5de8..162266eeb 100644 --- a/ParseTwitterUtils/ParseTwitterUtils.xcodeproj/project.pbxproj +++ b/ParseTwitterUtils/ParseTwitterUtils.xcodeproj/project.pbxproj @@ -971,7 +971,7 @@ baseConfigurationReference = 8154622F1D37FE6E0069489A /* Debug.xcconfig */; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ENABLE_CODE_COVERAGE = NO; + CLANG_ENABLE_CODE_COVERAGE = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_INFINITE_RECURSION = YES; diff --git a/ParseUI/ParseUI.xcodeproj/project.pbxproj b/ParseUI/ParseUI.xcodeproj/project.pbxproj index 36969872e..ac69130a1 100644 --- a/ParseUI/ParseUI.xcodeproj/project.pbxproj +++ b/ParseUI/ParseUI.xcodeproj/project.pbxproj @@ -1926,7 +1926,7 @@ baseConfigurationReference = 4A9A948E200D02CE005D8F4B /* Debug.xcconfig */; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ENABLE_CODE_COVERAGE = NO; + CLANG_ENABLE_CODE_COVERAGE = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; diff --git a/ParseUI/ParseUI.xcodeproj/xcshareddata/xcschemes/ParseUI.xcscheme b/ParseUI/ParseUI.xcodeproj/xcshareddata/xcschemes/ParseUI.xcscheme index fca7485e4..a3eb8e73b 100644 --- a/ParseUI/ParseUI.xcodeproj/xcshareddata/xcschemes/ParseUI.xcscheme +++ b/ParseUI/ParseUI.xcodeproj/xcshareddata/xcschemes/ParseUI.xcscheme @@ -26,7 +26,25 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + diff --git a/Rakefile b/Rakefile index 5bb35ed96..dffb7ae41 100644 --- a/Rakefile +++ b/Rakefile @@ -462,9 +462,7 @@ namespace :test do t.scheme = 'Parse-iOS' t.sdk = 'iphonesimulator' t.destinations = [ios_simulator] - t.configuration = 'Debug' - t.additional_options = { "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS" => "YES", - "GCC_GENERATE_TEST_COVERAGE_FILES" => "YES" } + t.configuration = 'Debug -enableCodeCoverage YES' t.actions = [XCTask::BuildAction::TEST] t.formatter = XCTask::BuildFormatter::XCODEBUILD @@ -483,9 +481,7 @@ namespace :test do t.scheme = 'Parse-macOS' t.sdk = 'macosx' - t.configuration = 'Debug' - t.additional_options = { "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS" => "YES", - "GCC_GENERATE_TEST_COVERAGE_FILES" => "YES" } + t.configuration = 'Debug -enableCodeCoverage YES' t.actions = [XCTask::BuildAction::TEST] t.formatter = XCTask::BuildFormatter::XCODEBUILD @@ -506,9 +502,7 @@ namespace :test do t.scheme = 'ParseFacebookUtilsV4-iOS' t.sdk = 'iphonesimulator' t.destinations = [ios_simulator] - t.configuration = 'Debug' - t.additional_options = { "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS" => "YES", - "GCC_GENERATE_TEST_COVERAGE_FILES" => "YES" } + t.configuration = 'Debug -enableCodeCoverage YES' t.actions = [XCTask::BuildAction::TEST] t.formatter = XCTask::BuildFormatter::XCODEBUILD @@ -532,9 +526,7 @@ namespace :test do t.scheme = 'ParseTwitterUtils-iOS' t.sdk = 'iphonesimulator' t.destinations = [ios_simulator] - t.configuration = 'Debug' - t.additional_options = { "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS" => "YES", - "GCC_GENERATE_TEST_COVERAGE_FILES" => "YES" } + t.configuration = 'Debug -enableCodeCoverage YES' t.actions = [XCTask::BuildAction::TEST] t.formatter = XCTask::BuildFormatter::XCODEBUILD @@ -562,7 +554,7 @@ namespace :test do t.scheme = 'ParseUI' t.sdk = 'iphonesimulator' t.destinations = [ios_simulator] - t.configuration = 'Debug' + t.configuration = 'Debug -enableCodeCoverage YES' t.actions = [XCTask::BuildAction::TEST] t.formatter = XCTask::BuildFormatter::XCODEBUILD @@ -584,8 +576,6 @@ namespace :test do t.sdk = 'iphonesimulator' t.destinations = [ios_simulator] t.configuration = 'Debug' - t.additional_options = { "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS" => "YES", - "GCC_GENERATE_TEST_COVERAGE_FILES" => "YES" } t.actions = [XCTask::BuildAction::CLEAN, XCTask::BuildAction::BUILD] t.formatter = XCTask::BuildFormatter::XCPRETTY @@ -607,8 +597,6 @@ namespace :test do t.sdk = 'iphonesimulator' t.destinations = [ios_simulator] t.configuration = 'Debug' - t.additional_options = { "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS" => "YES", - "GCC_GENERATE_TEST_COVERAGE_FILES" => "YES" } t.actions = [XCTask::BuildAction::CLEAN, XCTask::BuildAction::BUILD] t.formatter = XCTask::BuildFormatter::XCPRETTY