Skip to content

Commit

Permalink
Rename targets
Browse files Browse the repository at this point in the history
- add GitHub actions
  • Loading branch information
r-dent committed Feb 28, 2024
1 parent 0805b3e commit 746a96d
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Run SwiftLint"
run-name: Linting
on:
pull_request:
paths:
- '.github/workflows/swiftlint.yml'
- '.swiftlint.yml'
- '**/*.swift'
jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
with:
args: --strict
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "Run Tests"
run-name: Testing
on: [pull_request]
jobs:
Test:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Test StreamDeckKit
run: set -o pipefail && xcodebuild -scheme StreamDeckKit-Package test -destination "platform=iOS Simulator,name=iPhone 15,OS=latest" -skipMacroValidation | xcpretty
7 changes: 7 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
opt_in_rules:
- overridden_super_call

disabled_rules:
- identifier_name

line_length: 150
10 changes: 5 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ let package = Package(
platforms: [.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .macCatalyst(.v13)],
products: [
.library(
name: "StreamDeckKitMacros",
targets: ["StreamDeckKitMacros"]
name: "StreamDeckView",
targets: ["StreamDeckView"]
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"),

Check failure on line 17 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
],
targets: [
.macro(
name: "StreamDeckView",
name: "StreamDeckKitMacros",
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax")
]
),
.target(name: "StreamDeckKitMacros", dependencies: ["StreamDeckView"]),
.target(name: "StreamDeckView", dependencies: ["StreamDeckKitMacros"]),
.testTarget(
name: "StreamDeckKitMacrosTests",
dependencies: [
"StreamDeckView",
"StreamDeckKitMacros",
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"),

Check failure on line 32 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
]
),

Check failure on line 34 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ public protocol StreamDeckView: View {
/// ```
@attached(extension, conformances: StreamDeckView)
@attached(member, names: named(_$streamDeckViewContext), named(body), named(streamDeck), named(viewSize), named(viewIndex))
public macro StreamDeckView() = #externalMacro(module: "StreamDeckView", type: "StreamDeckViewMacro")
public macro StreamDeckView() = #externalMacro(module: "StreamDeckKitMacros", type: "StreamDeckViewMacro")

0 comments on commit 746a96d

Please sign in to comment.