diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e451d25..07c41e39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,5 +11,8 @@ jobs: uses: vapor/ci/.github/workflows/run-unit-tests.yml@main with: with_linting: true + with_musl: true + with_android: true + android_copy_files: .env.testing secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.swift-format b/.swift-format index 47901d18..980417b5 100644 --- a/.swift-format +++ b/.swift-format @@ -5,7 +5,7 @@ "indentation": { "spaces": 4 }, - "indentConditionalCompilationBlocks": true, + "indentConditionalCompilationBlocks": false, "indentSwitchCaseLabels": false, "lineBreakAroundMultilineExpressionChainComponents": false, "lineBreakBeforeControlFlowKeywords": false, diff --git a/Package.swift b/Package.swift index 67391756..6c776826 100755 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,10 @@ import PackageDescription let package = Package( name: "Imperial", platforms: [ - .macOS(.v13) + .macOS(.v13), + .iOS(.v16), + .tvOS(.v16), + .watchOS(.v9), ], products: [ .library(name: "ImperialCore", targets: ["ImperialCore"]), @@ -42,8 +45,8 @@ let package = Package( ), ], dependencies: [ - .package(url: "https://github.com/vapor/vapor.git", from: "4.110.1"), - .package(url: "https://github.com/vapor/jwt-kit.git", from: "5.1.1"), + .package(url: "https://github.com/vapor/vapor.git", from: "4.114.1"), + .package(url: "https://github.com/vapor/jwt-kit.git", from: "5.1.2"), ], targets: [ .target( @@ -86,6 +89,9 @@ let package = Package( .target(name: "ImperialShopify"), .product(name: "VaporTesting", package: "vapor"), ], + resources: [ + .copy("../../.env.testing") + ], swiftSettings: swiftSettings ), ] diff --git a/README.md b/README.md index 09b40434..2f79764f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Use the SPM string to easily include the dependendency in your `Package.swift` file ```swift -.package(url: "https://github.com/vapor-community/Imperial.git", from: "2.0.0-beta.2") +.package(url: "https://github.com/vapor-community/Imperial.git", from: "2.0.0") ``` and then add the desired provider to your target's dependencies: diff --git a/Sources/ImperialShopify/URL+Shopify.swift b/Sources/ImperialShopify/URL+Shopify.swift index 11050f9f..0b81bab8 100644 --- a/Sources/ImperialShopify/URL+Shopify.swift +++ b/Sources/ImperialShopify/URL+Shopify.swift @@ -1,5 +1,6 @@ import Crypto import Foundation +import Vapor extension URL { func generateHMAC(key: String) -> String { diff --git a/Tests/ImperialTests/ImperialTests.swift b/Tests/ImperialTests/ImperialTests.swift index c352b6fd..85e7bf90 100644 --- a/Tests/ImperialTests/ImperialTests.swift +++ b/Tests/ImperialTests/ImperialTests.swift @@ -1,3 +1,4 @@ +#if canImport(Testing) import ImperialAuth0 import ImperialDeviantArt import ImperialDiscord @@ -295,3 +296,4 @@ struct ImperialTests { #expect(ImperialError.missingEnvVar("foo") == ImperialError.missingEnvVar("bar")) } } +#endif // canImport(Testing) diff --git a/Tests/ImperialTests/ShopifyTests.swift b/Tests/ImperialTests/ShopifyTests.swift index f26ab057..8722d048 100644 --- a/Tests/ImperialTests/ShopifyTests.swift +++ b/Tests/ImperialTests/ShopifyTests.swift @@ -1,3 +1,4 @@ +#if canImport(Testing) import Foundation import Testing import VaporTesting @@ -71,3 +72,4 @@ struct ShopifyTests { #expect(hmac == "700e2dadb827fcc8609e9d5ce208b2e9cdaab9df07390d2cbca10d7c328fc4bf") } } +#endif // canImport(Testing) diff --git a/Tests/ImperialTests/withApp.swift b/Tests/ImperialTests/withApp.swift index 472f281e..dd3f5647 100644 --- a/Tests/ImperialTests/withApp.swift +++ b/Tests/ImperialTests/withApp.swift @@ -1,3 +1,4 @@ +#if canImport(Testing) import ImperialCore import Testing import Vapor @@ -30,3 +31,4 @@ let isLoggingConfigured: Bool = { } return true }() +#endif // canImport(Testing)