forked from DataDog/dd-sdk-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
86 lines (81 loc) · 4.56 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
stages:
- info
- lint
- test
ENV info:
stage: info
tags:
- mac-ventura-preview
allow_failure: true # do not block GH PRs
script:
- system_profiler SPSoftwareDataType # system info
- xcodebuild -version
- xcode-select -p # default Xcode
- ls /Applications/ | grep Xcode # other Xcodes
- xcodebuild -workspace "Datadog.xcworkspace" -scheme "DatadogCore iOS" -showdestinations -quiet # installed iOS destinations
- xcodebuild -workspace "Datadog.xcworkspace" -scheme "DatadogCore tvOS" -showdestinations -quiet # installed tvOS destinations
- xcbeautify --version
- swiftlint --version
- carthage version
- gh --version
- brew -v
- bundler --version
- python3 -V
Lint:
stage: lint
tags:
- mac-ventura-preview
allow_failure: true # do not block GH PRs
script:
- ./tools/lint/run-linter.sh
- ./tools/license/check-license.sh
SDK unit tests (iOS):
stage: test
tags:
- mac-ventura-preview
allow_failure: true # do not block GH PRs
variables:
TEST_WORKSPACE: "Datadog.xcworkspace"
TEST_DESTINATION: "platform=iOS Simulator,name=iPhone 15 Pro Max,OS=17.0.1"
script:
- make dependencies-gitlab
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore iOS" -only-testing:"DatadogCoreTests iOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore iOS" -only-testing:"DatadogInternalTests iOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore iOS" -only-testing:"DatadogLogsTests iOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore iOS" -only-testing:"DatadogTraceTests iOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore iOS" -only-testing:"DatadogRUMTests iOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore iOS" -only-testing:"DatadogWebViewTrackingTests iOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogSessionReplay iOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCrashReporting iOS" test | xcbeautify
SDK unit tests (tvOS):
stage: test
tags:
- mac-ventura-preview
allow_failure: true # do not block GH PRs
variables:
TEST_WORKSPACE: "Datadog.xcworkspace"
TEST_DESTINATION: "platform=tvOS Simulator,name=Apple TV,OS=17.0"
script:
- make dependencies-gitlab
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore tvOS" -only-testing:"DatadogCoreTests tvOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore tvOS" -only-testing:"DatadogInternalTests tvOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore tvOS" -only-testing:"DatadogLogsTests tvOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore tvOS" -only-testing:"DatadogTraceTests tvOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCore tvOS" -only-testing:"DatadogRUMTests tvOS" test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "DatadogCrashReporting tvOS" test | xcbeautify
SDK integration tests (iOS):
stage: test
tags:
- mac-ventura-preview
allow_failure: true # do not block GH PRs
variables:
TEST_WORKSPACE: "IntegrationTests/IntegrationTests.xcworkspace"
TEST_DESTINATION: "platform=iOS Simulator,name=iPhone 15 Pro Max,OS=17.0.1"
script:
- make dependencies-gitlab
- make prepare-integration-tests
# Before running crash reporting tests, disable Apple Crash Reporter so it doesn't capture the crash causing tests hang on "<app> quit unexpectedly" prompt:
- launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist
- ./tools/config/generate-http-server-mock-config.sh
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "IntegrationScenarios" -testPlan DatadogIntegrationTests test | xcbeautify
- xcodebuild -workspace "$TEST_WORKSPACE" -destination "$TEST_DESTINATION" -scheme "IntegrationScenarios" -testPlan DatadogCrashReportingIntegrationTests test | xcbeautify