-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README based on errors found on working with Xcode 11.4.x+/Swift 5.2 and CI #21
base: master
Are you sure you want to change the base?
Conversation
Generated by 🚫 Danger Swift against 0874c02 |
... | ||
], | ||
targets: [ | ||
.target(name: "DangerDependencies", dependencies: ["Danger", "DangerXCodeSummary"]), // dev | ||
.target(name: "DangerDependencies", dependencies: ["danger-swift", "DangerXCodeSummary"]) // dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that could potentially remove some optimisations SPM would do here, given you only need the Danger
library as dependency not the whole danger-swift, you don't need to build it all, then I would probably remove all the name: "
change, at least for the danger-swift
part.
@@ -65,7 +72,12 @@ DangerXCodeSummary can be used with SPM (this repo uses it on the Linux CI), but | |||
To generate the report run: | |||
|
|||
```bash | |||
swift test | XCPRETTY_JSON_FILE_OUTPUT=result.json xcpretty -f `xcpretty-json-formatter` | |||
swift test 2>&1 | XCPRETTY_JSON_FILE_OUTPUT=xcpretty_xcode_summary.json xcpretty -f `xcpretty-json-formatter` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
[...] | ||
|
||
swift run danger-swift ci --fail-on-errors=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The correct call should be
swift run danger-swift ci --failOnErrors
Also I'm not sure everyone wants that behaviour, it depends if you want or not your CI to continue after danger runs, Danger already updates the state of the PR, then it really depends on your workflow if it should or not fail the build
As mentioned in the comments in this test PR ( #20 ), I was not seeing the errors being recorded in Xcode Summary as expected nor the build to fail if a unit test failed (all output, errors included, needed to be redirected and piped through xcpretty).
Also, I had some issues installing Danger and Danger Plugins such as this one without adapting the Package.swift as SwiftPM was suggesting (see list of changes).