-
Notifications
You must be signed in to change notification settings - Fork 21
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
Unable to run on Github Action #24
Comments
I have the same problem. Did you find a way to make this work? When using marathon I get: And with a Package.swift I get: @f-meloni Do you have an example GitHub Actions workflow? I tried: - name: Lint
run: |
brew install danger/tap/danger-swift
danger-swift ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} Also tried: - name: Lint
run: |
brew install danger/tap/danger-js
swift build --target DangerDependencies
swift run danger-swift ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
@yonat-ateam can I see your Dangerfile? Because you are using swift build, but that error comes from the non SPM configuration, so there is something wrong there for sure. |
My Dangerfile.swift (when trying with marathon): // swiftlint:disable all
import Danger
import DangerSwiftCoverage // package: https://github.com/f-meloni/danger-swift-coverage.git
let danger = Danger()
SwiftLint.lint(inline: true, swiftlintPath: "Pods/SwiftLint/swiftlint")
Coverage.xcodeBuildCoverage(
.derivedDataFolder("Build"),
minimumCoverage: 50
) |
@yonat-ateam given you are using |
I tried both ways:
// swift-tools-version:5.1
import PackageDescription
let package = Package(
name: "DangerDependencies",
products: [
.library(name: "DangerDependencies", type: .dynamic, targets: ["DangerDependencies"]) // dev
],
dependencies: [
.package(url: "https://github.com/danger/swift.git", from: "3.11.1"), // dev
.package(url: "https://github.com/f-meloni/danger-swift-coverage.git", from: "1.2.1"), // dev
],
targets: [
.target(name: "DangerDependencies", dependencies: ["Danger", "DangerSwiftCoverage"], path: "DangerDependencies") // dev
]
) |
Note: My project is a regular iOS app, not a swift package. I only use the Package.swift for danger. |
Also, I made an empty file at |
With SPM the name of the framework is fixed, so you need to call the library |
Thanks, will try that! |
I'm afraid I'm still getting
Any ideas? |
I turned off spm caching (through |
I tried my best when following the instructions, but I am unable to run the DangerSwiftCoverage plugin on my danger github action. I did enable "Gather the Coverage" on my XCode. I am using Cocoapods for my dependencies, so I haven't yet moved to SPM
HymnalDreamTeam/Hymns-iOS#79
The text was updated successfully, but these errors were encountered: