Skip to content

Commit

Permalink
Merge pull request #1999 from DataDog/ncreated/chore/ci-visibility-sh…
Browse files Browse the repository at this point in the history
…adow-build

chore: Instrument unit tests with CI Test Visibility `2.5.0`
  • Loading branch information
ncreated authored Aug 21, 2024
2 parents 475924e + 5fa648b commit 93fd18c
Show file tree
Hide file tree
Showing 23 changed files with 1,987 additions and 401 deletions.
18 changes: 16 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,21 @@ Unit Tests (iOS):
script:
- ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE"
- make clean repo-setup ENV=ci
- make test-ios-all OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE"
- make test-ios-all OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=0

Unit Tests (iOS, Test Visibility shadow):
stage: test
rules:
- !reference [.test-pipeline-job, rules]
- !reference [.release-pipeline-job, rules]
variables:
PLATFORM: "iOS Simulator"
DEVICE: "iPhone 15 Pro"
allow_failure: true
script:
- ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE"
- make clean repo-setup ENV=ci
- make test-ios-all OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=1

Unit Tests (tvOS):
stage: test
Expand All @@ -109,7 +123,7 @@ Unit Tests (tvOS):
script:
- ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE"
- make clean repo-setup ENV=ci
- make test-tvos-all OS="$DEFAULT_TVOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE"
- make test-tvos-all OS="$DEFAULT_TVOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=0

UI Tests:
stage: ui-test
Expand Down
2 changes: 1 addition & 1 deletion Datadog/Datadog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13709,7 +13709,7 @@
repositoryURL = "https://github.com/DataDog/dd-sdk-swift-testing.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 2.4.0;
minimumVersion = 2.5.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,6 @@
ReferencedContainer = "container:Datadog.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3CE11A0429F7BE0300202522"
BuildableName = "DatadogWebViewTrackingTests iOS.xctest"
BlueprintName = "DatadogWebViewTrackingTests iOS"
ReferencedContainer = "container:Datadog.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand All @@ -61,9 +47,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "61133B8A242393DE00786299"
BuildableName = "DatadogCoreTests iOS.xctest"
BlueprintName = "DatadogCoreTests iOS"
BlueprintIdentifier = "61133B81242393DE00786299"
BuildableName = "DatadogCore.framework"
BlueprintName = "DatadogCore iOS"
ReferencedContainer = "container:Datadog.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -81,92 +67,137 @@
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_API_KEY"
value = "$(DD_SDK_SWIFT_TESTING_APIKEY)"
value = "$(DD_API_KEY)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_ENV"
value = "$(DD_SDK_SWIFT_TESTING_ENV)"
value = "$(DD_ENV)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_SERVICE"
value = "$(DD_SDK_SWIFT_TESTING_SERVICE)"
value = "$(DD_SERVICE)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "SRCROOT"
value = "$(SRCROOT)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_DISABLE_SDKIOS_INTEGRATION"
value = "1"
key = "DD_ENABLE_STDOUT_INSTRUMENTATION"
value = "$(DD_ENABLE_STDOUT_INSTRUMENTATION)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_DISABLE_HEADERS_INJECTION"
value = "1"
key = "DD_ENABLE_STDERR_INSTRUMENTATION"
value = "$(DD_ENABLE_STDERR_INSTRUMENTATION)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_DISABLE_NETWORK_INSTRUMENTATION"
value = "1"
value = "$(DD_DISABLE_NETWORK_INSTRUMENTATION)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "SRCROOT"
value = "$(SRCROOT)"
key = "DD_DISABLE_RUM_INTEGRATION"
value = "$(DD_DISABLE_RUM_INTEGRATION)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "BITRISE_SOURCE_DIR"
value = "$(BITRISE_SOURCE_DIR)"
key = "DD_DISABLE_SOURCE_LOCATION"
value = "$(DD_DISABLE_SOURCE_LOCATION)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "BITRISE_TRIGGERED_WORKFLOW_ID"
value = "$(BITRISE_TRIGGERED_WORKFLOW_ID)"
key = "DD_DISABLE_CRASH_HANDLER"
value = "$(DD_DISABLE_CRASH_HANDLER)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "BITRISE_BUILD_SLUG"
value = "$(BITRISE_BUILD_SLUG)"
key = "DD_GIT_REPOSITORY_URL"
value = "$(DD_GIT_REPOSITORY_URL)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "BITRISE_BUILD_NUMBER"
value = "$(BITRISE_BUILD_NUMBER)"
key = "DD_TRACE_DEBUG"
value = "$(DD_TRACE_DEBUG)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "BITRISE_BUILD_URL"
value = "$(BITRISE_BUILD_URL)"
key = "GITLAB_CI"
value = "$(GITLAB_CI)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_ENABLE_STDOUT_INSTRUMENTATION"
value = "1"
key = "CI_PROJECT_DIR"
value = "$(CI_PROJECT_DIR)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_ENABLE_STDERR_INSTRUMENTATION"
value = "1"
key = "CI_JOB_STAGE"
value = "$(CI_JOB_STAGE)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "CI_JOB_NAME"
value = "$(CI_JOB_NAME)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "CI_JOB_URL"
value = "$(CI_JOB_URL)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "CI_PIPELINE_ID"
value = "$(CI_PIPELINE_ID)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "CI_PIPELINE_IID"
value = "$(CI_PIPELINE_IID)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "CI_PIPELINE_URL"
value = "$(CI_PIPELINE_URL)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "CI_PROJECT_PATH"
value = "$(CI_PROJECT_PATH)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "CI_COMMIT_SHA"
value = "$(CI_COMMIT_SHA)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "CI_COMMIT_BRANCH"
value = "$(CI_COMMIT_BRANCH)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_APPLICATION_KEY"
value = "$(DD_SDK_SWIFT_TESTING_APPLICATION_KEY)"
key = "CI_COMMIT_TAG"
value = "$(CI_COMMIT_TAG)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_CIVISIBILITY_GIT_UPLOAD_ENABLED"
value = "1"
key = "CI_COMMIT_MESSAGE"
value = "$(CI_COMMIT_MESSAGE)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_CIVISIBILITY_ITR_ENABLED"
value = "0"
key = "CI_COMMIT_AUTHOR"
value = "$(CI_COMMIT_AUTHOR)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_CIVISIBILITY_EXCLUDED_BRANCHES"
value = "develop,release/*,hotfix/*"
key = "CI_COMMIT_TIMESTAMP"
value = "$(CI_COMMIT_TIMESTAMP)"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
Expand Down
Loading

0 comments on commit 93fd18c

Please sign in to comment.