-
Notifications
You must be signed in to change notification settings - Fork 21
Create GitHub Action CI file #31
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
base: master
Are you sure you want to change the base?
Changes from 4 commits
3c4df8e
8c12771
b7cc309
4bbd45e
6c08ae2
346a854
da378c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: CI | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-11 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: gem install bundler | ||
- run: bundle install | ||
- run: npm install -g danger | ||
- run: swift package generate-xcodeproj | ||
- run: xcodebuild test -scheme DangerSwiftCoverage-Package -derivedDataPath build/ -enableCodeCoverage YES | XCPRETTY_JSON_FILE_OUTPUT=result.json xcpretty -f `xcpretty-json-formatter` | ||
- run: DEBUG="*" swift run danger-swift ci | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>SchemeUserState</key> | ||
<dict> | ||
<key>DangerDeps.xcscheme_^#shared#^_</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>1</integer> | ||
</dict> | ||
<key>DangerSwiftCoverage-Package.xcscheme_^#shared#^_</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>0</integer> | ||
</dict> | ||
<key>DangerSwiftCoverage.xcscheme_^#shared#^_</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>2</integer> | ||
</dict> | ||
<key>SWXMLHashPlayground (Playground) 1.xcscheme</key> | ||
<dict> | ||
<key>isShown</key> | ||
<false/> | ||
<key>orderHint</key> | ||
<integer>5</integer> | ||
</dict> | ||
<key>SWXMLHashPlayground (Playground) 2.xcscheme</key> | ||
<dict> | ||
<key>isShown</key> | ||
<false/> | ||
<key>orderHint</key> | ||
<integer>6</integer> | ||
</dict> | ||
<key>SWXMLHashPlayground (Playground).xcscheme</key> | ||
<dict> | ||
<key>isShown</key> | ||
<false/> | ||
<key>orderHint</key> | ||
<integer>4</integer> | ||
</dict> | ||
<key>Test area (Playground) 1.xcscheme</key> | ||
<dict> | ||
<key>isShown</key> | ||
<false/> | ||
<key>orderHint</key> | ||
<integer>8</integer> | ||
</dict> | ||
<key>Test area (Playground) 2.xcscheme</key> | ||
<dict> | ||
<key>isShown</key> | ||
<false/> | ||
<key>orderHint</key> | ||
<integer>9</integer> | ||
</dict> | ||
<key>Test area (Playground).xcscheme</key> | ||
<dict> | ||
<key>isShown</key> | ||
<false/> | ||
<key>orderHint</key> | ||
<integer>7</integer> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// swift-tools-version:5.1 | ||
// swift-tools-version:5.3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you try setting this to 5.5? |
||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
@@ -14,23 +14,29 @@ let package = Package( | |
.library(name: "DangerDeps", type: .dynamic, targets: ["DangerDependencies"]), // dev | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/danger/swift.git", from: "3.0.0"), | ||
.package(name: "danger-swift", url: "https://github.com/danger/swift.git", from: "3.0.0"), | ||
// Dev dependencies | ||
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.35.8"), // dev | ||
.package(url: "https://github.com/Realm/SwiftLint", from: "0.28.1"), // dev | ||
.package(url: "https://github.com/f-meloni/Rocket", from: "1.0.0"), // dev | ||
.package(url: "https://github.com/orta/Komondor", from: "1.0.0"), // dev | ||
.package(url: "https://github.com/f-meloni/danger-swift-xcodesummary", from: "1.0.0"), // dev | ||
.package(name: "DangerXCodeSummary", url: "https://github.com/f-meloni/danger-swift-xcodesummary", from: "1.0.0"), // dev | ||
], | ||
targets: [ | ||
.target(name: "DangerDependencies", dependencies: ["Danger", "DangerSwiftCoverage", "DangerXCodeSummary"]), // dev | ||
.target(name: "DangerDependencies", dependencies: [ | ||
.product(name: "Danger", package: "danger-swift"), | ||
"DangerSwiftCoverage", | ||
"DangerXCodeSummary", | ||
]), // dev | ||
.target( | ||
name: "DangerSwiftCoverage", | ||
dependencies: ["Danger"] | ||
dependencies: [ | ||
.product(name: "Danger", package: "danger-swift"), | ||
] | ||
), | ||
.testTarget( | ||
name: "DangerSwiftCoverageTests", | ||
dependencies: ["DangerSwiftCoverage", "DangerFixtures"] | ||
dependencies: ["DangerSwiftCoverage", .product(name: "DangerFixtures", package: "danger-swift")] | ||
), | ||
] | ||
) | ||
|
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.
generate-xcodeproj
is deprecated. We're now usingxcodebuild
directly through fastlane scan, which results in the following output:In other words, you can skip generating the Xcode project and just use
xcodebuild
directly on the packageThere 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 knew was deprecated, but didn't know I could use xcodebuild directly, that is pretty cool! thank you :)