Skip to content

Support swift-aws-lambda-runtime 1.0.0-alpha.2 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/swift-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ jobs:
strategy:
matrix:
image:
- swift:5.7.3-amazonlinux2
- swift:5.10.1
services:
localstack:
image: localstack/localstack
container:
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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
6 changes: 3 additions & 3 deletions Sources/BreezeLambdaAPI/APIGatewayV2Response+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import struct AWSLambdaEvents.APIGatewayV2Response
import struct AWSLambdaEvents.HTTPResponseStatus
import HTTPTypes
import class Foundation.JSONEncoder

extension APIGatewayV2Response {
Expand All @@ -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)
}
Expand All @@ -40,7 +40,7 @@ extension APIGatewayV2Response {
/// - Parameters:
/// - object: Encodable Object
/// - statusCode: HTTP Status Code
init<Output: Encodable>(with object: Output, statusCode: AWSLambdaEvents.HTTPResponseStatus) {
init<Output: Encodable>(with object: Output, statusCode: HTTPResponse.Status) {
var body = "{}"
if let data = try? Self.encoder.encode(object) {
body = String(data: data, encoding: .utf8) ?? body
Expand Down
Loading