forked from DataDog/dd-sdk-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitrise.yml
189 lines (180 loc) · 6.3 KB
/
bitrise.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
---
format_version: '8'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: other
# To customize how workflows are run on different triggers,
# go to Workflow Editor on Bitrise.io.
workflows:
push_to_any_branch:
after_run:
- _make_dependencies
- run_linter
- run_unit_tests
- run_integration_tests
- run_ui_tests
- check_dependency_managers
- _deploy_artifacts
_make_dependencies:
description: |-
Does `make dependencies` to prepare source code in repo for building and testing.
steps:
title: Do `make dependencies`.
inputs:
- content: |-
#!/usr/bin/env bash
set -e
make dependencies
_deploy_artifacts:
description: |-
Uploads artifacts to associate them with build log on Bitrise.io.
steps:
- deploy-to-bitrise-io: {}
run_linter:
description: |-
Runs swiftlint and license check for all source and test files.
steps:
title: Lint Sources/*
inputs:
- strict: 'yes'
- lint_config_file: "$BITRISE_SOURCE_DIR/tools/lint/sources.swiftlint.yml"
- linting_path: "$BITRISE_SOURCE_DIR"
- reporter: emoji
title: Lint Tests/*
is_always_run: true
inputs:
- strict: 'yes'
- linting_path: "$BITRISE_SOURCE_DIR"
- lint_config_file: "$BITRISE_SOURCE_DIR/tools/lint/tests.swiftlint.yml"
- reporter: emoji
title: Check license headers
is_always_run: true
inputs:
- content: |-
#!/usr/bin/env bash
set -e
./tools/license/check-license.sh
run_unit_tests:
description: |-
Runs unit tests for SDK on iOS Simulator.
Runs benchmarks for SDK on iOS Simulator.
Runs unit tests for HTTPServerMock package on macOS.
steps:
title: Run unit tests for Datadog - iOS Simulator
inputs:
- scheme: Datadog
- simulator_device: iPhone 11
- is_clean_build: 'yes'
- generate_code_coverage_files: 'yes'
- project_path: Datadog.xcworkspace
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/Unit-tests.html"
- xcode-test:
title: Run benchmarks - DatadogBenchmarkTests on iOS Simulator
inputs:
- scheme: DatadogBenchmarkTests
- simulator_device: iPhone 11
- should_build_before_test: 'no'
- is_clean_build: 'no'
- generate_code_coverage_files: 'yes'
- project_path: Datadog.xcworkspace
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/Benchmark-tests.html"
title: Generate HTTPServerMock.xcodeproj
inputs:
- content: |-
#!/usr/bin/env bash
set -e
make xcodeproj-httpservermock
- xcode-test-mac:
title: Run unit tests for HTTPServerMock.xcodeproj - macOS
inputs:
- scheme: HTTPServerMock-Package
- destination: platform=OS X,arch=x86_64
- project_path: instrumented-tests/http-server-mock/HTTPServerMock.xcodeproj
run_ui_tests:
description: |-
Runs UI tests for Shopist app on iOS Simulator.
steps:
title: Generate client token for Shopist
inputs:
- content: |-
#!/usr/bin/env bash
set -e
echo 'DATADOG_CLIENT_TOKEN="fake-client-token-for-shopist"' > xcconfigs/Datadog.local.xcconfig
title: Run UI tests for Shopist - iOS Simulator
inputs:
- scheme: Shopist
- simulator_device: iPhone 11
- generate_code_coverage_files: 'yes'
- project_path: Shopist/Shopist.xcodeproj
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/Shopist-UI-tests.html"
run_integration_tests:
description: |-
Runs integration tests from Datadog.xcworkspace.
steps:
- xcode-test:
title: Run integration tests - DatadogIntegrationTests on iOS Simulator
inputs:
- scheme: DatadogIntegrationTests
- simulator_device: iPhone 11
- should_build_before_test: 'no'
- is_clean_build: 'no'
- generate_code_coverage_files: 'yes'
- project_path: Datadog.xcworkspace
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/Integration-tests.html"
check_dependency_managers:
description: |-
Uses supported dependency managers to fetch, install and link the SDK
to test projects.
steps:
title: Test SPM compatibility
inputs:
- content: |-
#!/usr/bin/env bash
set -e
make test-spm ci=true
- xcode-test:
title: Run SPMProject tests
inputs:
- scheme: SPMProject
- is_clean_build: 'yes'
- cache_level: none
- project_path: "$BITRISE_SOURCE_DIR/dependency-manager-tests/spm/SPMProject.xcodeproj"
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/SPMProject-tests.html"
title: Test Carthage compatibility
inputs:
- content: |-
#!/usr/bin/env bash
set -e
make test-carthage ci=true
- xcode-test:
title: Run CTProject tests
inputs:
- scheme: CTProject
- is_clean_build: 'yes'
- cache_level: none
- project_path: "$BITRISE_SOURCE_DIR/dependency-manager-tests/carthage/CTProject.xcodeproj"
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/CTProject-tests.html"
title: Test Cocoapods compatibility
inputs:
- content: |-
#!/usr/bin/env bash
set -e
make test-cocoapods ci=true
- xcode-test:
title: Run CPProject tests
inputs:
- scheme: CPProject
- is_clean_build: 'yes'
- cache_level: none
- project_path: "$BITRISE_SOURCE_DIR/dependency-manager-tests/cocoapods/CPProject.xcworkspace"
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/CPProject-tests.html"