diff --git a/.github/workflows/swift-test.yml b/.github/workflows/swift-test.yml index 29ea6f2..06a1fb4 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 services: localstack: image: localstack/localstack @@ -26,6 +26,7 @@ jobs: image: ${{ matrix.image }} env: LOCALSTACK_ENDPOINT : "http://localstack:4566" + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} # Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest defaults: run: @@ -34,10 +35,10 @@ jobs: steps: # Checkout the repository to the GitHub Actions runner - name: Checkout - uses: actions/checkout@v3 - - name: Setup - run: | - yum -y update && yum -y install git make curl + uses: actions/checkout@v4 + - name: Setup + run: | + 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 diff --git a/Package.swift b/Package.swift index ab45ca6..2173617 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,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/soto-project/soto.git", from: "6.7.0"), .package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), diff --git a/Sources/BreezeLambdaAPI/APIGatewayV2Response+Extensions.swift b/Sources/BreezeLambdaAPI/APIGatewayV2Response+Extensions.swift index 0cd7fea..8da9234 100644 --- a/Sources/BreezeLambdaAPI/APIGatewayV2Response+Extensions.swift +++ b/Sources/BreezeLambdaAPI/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 extension APIGatewayV2Response { @@ -31,7 +31,7 @@ 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 @@ 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