Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Panajev
Copy link

@Panajev Panajev commented Jun 1, 2020

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).

@DangerXCodeSummaryBot
Copy link
Collaborator

DangerXCodeSummaryBot commented Jun 1, 2020

Messages
📖 Executed 14 tests, with 0 failures (0 unexpected) in 0.211 (0.229) seconds

Generated by 🚫 Danger Swift against 0874c02

...
],
targets: [
.target(name: "DangerDependencies", dependencies: ["Danger", "DangerXCodeSummary"]), // dev
.target(name: "DangerDependencies", dependencies: ["danger-swift", "DangerXCodeSummary"]) // dev
Copy link
Owner

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`
Copy link
Owner

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants