From b1b6b60b3c2aafdf1f7916646b0f71d2d662e580 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 29 Aug 2023 16:20:56 +0200 Subject: [PATCH] lets go danger --- .github/workflows/main.yml | 11 ++++ Dangerfile.swift | 6 +++ Domain/Package.swift | 2 +- FlickrFinder/DangerProxy.swift | 1 + Package.resolved | 95 ++++++++++++++++++++++++++++++++++ Package.swift | 23 ++++++++ 6 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 Dangerfile.swift create mode 100644 FlickrFinder/DangerProxy.swift create mode 100644 Package.resolved create mode 100644 Package.swift diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4e597d..c69a82d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,3 +59,14 @@ jobs: -Dsonar.c.file.suffixes=- -Dsonar.cpp.file.suffixes=- -Dsonar.objc.file.suffixes=- +build: + runs-on: ubuntu-latest + name: "Run Danger" + steps: + - uses: actions/checkout@v1 + - name: Danger + uses: danger/swift@3.15.0 + with: + args: --failOnErrors --no-publish-check + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/Dangerfile.swift b/Dangerfile.swift new file mode 100644 index 0000000..a9c144e --- /dev/null +++ b/Dangerfile.swift @@ -0,0 +1,6 @@ +import DangerSwiftCoverage + +Coverage.xcodeBuildCoverage( + .derivedDataFolder("Build"), + minimumCoverage: 80 +) diff --git a/Domain/Package.swift b/Domain/Package.swift index adab006..45a9508 100644 --- a/Domain/Package.swift +++ b/Domain/Package.swift @@ -26,7 +26,7 @@ let package = Package( .target( name: "Domain", dependencies: [ - .product(name: "Factory", package: "Factory") + .product(name: "Factory", package: "Factory"), ]), .testTarget( name: "DomainTests", diff --git a/FlickrFinder/DangerProxy.swift b/FlickrFinder/DangerProxy.swift new file mode 100644 index 0000000..fecc4ab --- /dev/null +++ b/FlickrFinder/DangerProxy.swift @@ -0,0 +1 @@ +import Foundation diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..322ce46 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,95 @@ +{ + "pins" : [ + { + "identity" : "danger-swift-coverage", + "kind" : "remoteSourceControl", + "location" : "https://github.com/f-meloni/danger-swift-coverage", + "state" : { + "revision" : "104ded872b6e1af1def04b897bc3a29fe04865ba", + "version" : "0.3.0" + } + }, + { + "identity" : "files", + "kind" : "remoteSourceControl", + "location" : "https://github.com/JohnSundell/Files.git", + "state" : { + "revision" : "a84615f4558151fab52ac38df697ce2442991f93", + "version" : "2.3.0" + } + }, + { + "identity" : "logger", + "kind" : "remoteSourceControl", + "location" : "https://github.com/shibapm/Logger", + "state" : { + "revision" : "53c3ecca5abe8cf46697e33901ee774236d94cce", + "version" : "0.2.3" + } + }, + { + "identity" : "marathon", + "kind" : "remoteSourceControl", + "location" : "https://github.com/JohnSundell/Marathon", + "state" : { + "revision" : "35b672e05ac411fb104e462fbfd6541f995abc17", + "version" : "3.3.0" + } + }, + { + "identity" : "octokit.swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/nerdishbynature/octokit.swift", + "state" : { + "revision" : "f762f1566f7cd0e683b9329f169c28ab6ef993cc", + "version" : "0.12.0" + } + }, + { + "identity" : "releases", + "kind" : "remoteSourceControl", + "location" : "https://github.com/JohnSundell/Releases.git", + "state" : { + "revision" : "ea62f33a429185b0ed21344c2355862c5bc4fcce", + "version" : "4.0.0" + } + }, + { + "identity" : "requestkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/nerdishbynature/RequestKit.git", + "state" : { + "revision" : "8b0258ea2a4345cbcac90509b764faacea12efb0", + "version" : "3.2.1" + } + }, + { + "identity" : "require", + "kind" : "remoteSourceControl", + "location" : "https://github.com/JohnSundell/Require.git", + "state" : { + "revision" : "7cfbd0d8a2dede0e01f6f0d8ab2c7acef1df112e", + "version" : "2.0.1" + } + }, + { + "identity" : "shellout", + "kind" : "remoteSourceControl", + "location" : "https://github.com/JohnSundell/ShellOut", + "state" : { + "revision" : "e1577acf2b6e90086d01a6d5e2b8efdaae033568", + "version" : "2.3.0" + } + }, + { + "identity" : "swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/danger/swift.git", + "state" : { + "revision" : "33d35bf94f54155be505ffecfca745e4cc1cd0cc", + "version" : "1.6.5" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..df61d22 --- /dev/null +++ b/Package.swift @@ -0,0 +1,23 @@ +// swift-tools-version:5.7 + import PackageDescription + + let package = Package( + name: "FlickrFinder-PRLinter", + defaultLocalization: "en", + products: [ + .library(name: "DangerDeps", type: .dynamic, targets: ["FlickrFinder-PRLinter"]) + ], + dependencies: [ + .package(url: "https://github.com/f-meloni/danger-swift-coverage", from: "0.1.0") // dev + ], + targets: [ + .target( + name: "FlickrFinder-PRLinter", + dependencies: [ + .product(name: "DangerSwiftCoverage", package: "danger-swift-coverage") + ], + path: "FlickrFinder", + sources: ["DangerProxy.swift"] + ) + ] + )