Skip to content

Commit 7bd73f7

Browse files
Apply standard Swift package configuration (#25)
1 parent 952cee0 commit 7bd73f7

File tree

4 files changed

+18
-99
lines changed

4 files changed

+18
-99
lines changed

.github/workflows/swift.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
steps:
2121
- name: Checkout source
2222
uses: actions/checkout@v6
23-
- name: Download swiftlint binary
23+
- name: Resolve package dependencies
2424
run: swift package resolve
2525
- name: Lint
2626
run: >
27-
"$(find ".build/artifacts/swiftlint" -path "*macos*" -type f -name swiftlint -perm +111 -print -quit)"
27+
swift package plugin --allow-writing-to-package-directory swiftlint --
2828
lint --strict --reporter github-actions-logging
2929
- name: Resolve package dependencies
3030
run: xcodebuild -resolvePackageDependencies

Package.resolved

Lines changed: 6 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,8 @@ let package = Package(
2727
url: "https://github.com/socketio/socket.io-client-swift.git",
2828
exact: "16.1.1"),
2929
.package(
30-
url: "https://github.com/realm/SwiftLint.git",
30+
url: "https://github.com/SimplyDanny/SwiftLintPlugins.git",
3131
exact: "0.59.1"),
32-
.package(
33-
url: "https://github.com/Quick/Nimble.git",
34-
exact: "14.0.0"),
3532
],
3633
targets: [
3734
.target(
@@ -44,7 +41,6 @@ let package = Package(
4441
name: "NodesSocketIOTests",
4542
dependencies: [
4643
"NodesSocketIO",
47-
"Nimble",
4844
]),
4945
]
5046
)
@@ -55,6 +51,7 @@ package.targets.forEach { target in
5551
.regular,
5652
.test,
5753
.executable,
54+
.macro,
5855
]
5956

6057
guard types.contains(target.type)
@@ -71,7 +68,7 @@ package.targets.forEach { target in
7168

7269
if enableSwiftLintBuildToolPlugin {
7370
target.plugins = (target.plugins ?? []) + [
74-
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLint"),
71+
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins"),
7572
]
7673
}
7774
}

Tests/NodesSocketIOTests/NodesSocketIOTests.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
// See https://github.com/Tinder/Nodes-Tree-Visualizer/blob/main/LICENSE for license information.
88
//
99

10-
import Nimble
1110
import NodesSocketIO
12-
import XCTest
11+
import Testing
1312

14-
final class NodesSocketIOTests: XCTestCase {
13+
struct NodesSocketIOTests {
1514

15+
private final class Mock: Sendable {}
16+
17+
@Test
1618
func testDebugSocket() {
17-
expect(DebugSocket()) != nil
19+
let debugSocket: DebugSocket<Mock>? = .init { _ in nil }
20+
#expect(debugSocket != nil)
1821
}
1922
}

0 commit comments

Comments
 (0)