You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to generate a JSON file that this plugin can read.
12
-
13
-
**Using [danger-swift](https://github.com/danger/swift)**? You may want to take a look at [danger-swift-xcodesummary](https://github.com/f-meloni/danger-swift-xcodesummary).
14
-
15
9
## How does it look?
16
10
17
11
<table>
@@ -62,24 +56,6 @@ to generate a JSON file that this plugin can read.
<td>Executed 5 tests, with 1 failure (0 unexpected) in 0.032 (0.065) seconds</td>
78
-
</tr>
79
-
</tr>
80
-
</tbody>
81
-
</table>
82
-
83
59
## Installation
84
60
85
61
Add this line to your Gemfile:
@@ -93,9 +69,13 @@ gem 'danger-xcode_summary'
93
69
Just add this line to your `Dangerfile`:
94
70
95
71
```ruby
96
-
xcode_summary.report 'xcodebuild.json'
72
+
xcode_summary.report 'MyApp.xcresult'
97
73
```
98
74
75
+
You need to pass the path of the `xcresult` generated after compiling your app.
76
+
By default, this is inside the `DerivedData` for your project, but you can use the `-resultBundlePath`
77
+
flag when calling `xcodebuild` to customize its path. You can read more about it in this [blog post from the folks at PSPDFKit](https://pspdfkit.com/blog/2021/deflaking-ci-tests-with-xcresults/#using-xcresult-bundles).
78
+
99
79
You can also ignore warnings from certain files by setting `ignored_files`:
100
80
Warning: `ignored_files` patterns applied on relative paths.
You can use `ignores_warnings` to supress warnings and shows only errors.
@@ -123,13 +103,13 @@ When this value is enabled, each warnings and errors are commented on each lines
123
103
```ruby
124
104
# Comment on each lines
125
105
xcode_summary.inline_mode =true
126
-
xcode_summary.report 'xcodebuild.json'
106
+
xcode_summary.report 'MyApp.xcresult'
127
107
```
128
108
129
109
You can get warning and error number by calling `warning_error_count`. The return will be a JSON string contains warning and error count, e.g {"warnings":1,"errors":3}:
130
110
131
111
```ruby
132
-
result = xcode_summary.warning_error_count 'xcodebuild.json'
112
+
result = xcode_summary.warning_error_count 'MyApp.xcresult'
0 commit comments