From 1ac5349fbc9515711653db3cc938174c94d6963d Mon Sep 17 00:00:00 2001 From: Andrea Scuderi Date: Sun, 25 Aug 2024 11:50:38 +0200 Subject: [PATCH 1/2] Support swift-aws-lambda-runtime alpha.2 --- Package.swift | 2 +- .../APIGatewayV2Response+Extensions.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Package.swift b/Package.swift index d5b904a..df0851e 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ let package = Package( ) ], dependencies: [ - .package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha.1"), + .package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha.2"), .package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "0.1.0"), .package(url: "https://github.com/swift-server/async-http-client.git", from: "1.11.2"), ], diff --git a/Sources/BreezeLambdaWebHook/APIGatewayV2Response+Extensions.swift b/Sources/BreezeLambdaWebHook/APIGatewayV2Response+Extensions.swift index d4370b5..237f8aa 100644 --- a/Sources/BreezeLambdaWebHook/APIGatewayV2Response+Extensions.swift +++ b/Sources/BreezeLambdaWebHook/APIGatewayV2Response+Extensions.swift @@ -13,7 +13,7 @@ // limitations under the License. import struct AWSLambdaEvents.APIGatewayV2Response -import struct AWSLambdaEvents.HTTPResponseStatus +import HTTPTypes import class Foundation.JSONEncoder public extension APIGatewayV2Response { @@ -31,7 +31,7 @@ public extension APIGatewayV2Response { /// - Parameters: /// - error: Error /// - statusCode: HTTP Status Code - init(with error: Error, statusCode: AWSLambdaEvents.HTTPResponseStatus) { + init(with error: Error, statusCode: HTTPResponse.Status) { let bodyError = BodyError(error: String(describing: error)) self.init(with: bodyError, statusCode: statusCode) } @@ -40,7 +40,7 @@ public extension APIGatewayV2Response { /// - Parameters: /// - object: Encodable Object /// - statusCode: HTTP Status Code - init(with object: Output, statusCode: AWSLambdaEvents.HTTPResponseStatus) { + init(with object: Output, statusCode: HTTPResponse.Status) { var body = "{}" if let data = try? Self.encoder.encode(object) { body = String(data: data, encoding: .utf8) ?? body From 3285754dc2891697f78043b5e38b40555b80e85f Mon Sep 17 00:00:00 2001 From: Andrea Scuderi Date: Sun, 25 Aug 2024 11:50:46 +0200 Subject: [PATCH 2/2] update GHA --- .github/workflows/swift-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/swift-test.yml b/.github/workflows/swift-test.yml index 02e8b88..0d15bfd 100644 --- a/.github/workflows/swift-test.yml +++ b/.github/workflows/swift-test.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: image: - - swift:5.7.3-amazonlinux2 + - swift:5.10.1 container: image: ${{ matrix.image }} # Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest @@ -29,10 +29,10 @@ jobs: steps: # Checkout the repository to the GitHub Actions runner - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup run: | - yum -y update && yum -y install git make curl + export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && apt-get -q install -y make curl wget - name: Test run: | make test