Skip to content

Commit 293eb1a

Browse files
Andrea-ScuderiAndrea Scuderi
and
Andrea Scuderi
authored
Support swift-aws-lambda-runtime 1.0.0-alpha.2 (#1)
* Support swift-aws-lambda-runtime 1.0.0-alpha.2 * Fix GHA --------- Co-authored-by: Andrea Scuderi <[email protected]>
1 parent ea29236 commit 293eb1a

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.github/workflows/swift-test.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ jobs:
1818
strategy:
1919
matrix:
2020
image:
21-
- swift:5.7.3-amazonlinux2
21+
- swift:5.10.1
2222
services:
2323
localstack:
2424
image: localstack/localstack
2525
container:
2626
image: ${{ matrix.image }}
2727
env:
2828
LOCALSTACK_ENDPOINT : "http://localstack:4566"
29+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
2930
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
3031
defaults:
3132
run:
@@ -34,10 +35,10 @@ jobs:
3435
steps:
3536
# Checkout the repository to the GitHub Actions runner
3637
- name: Checkout
37-
uses: actions/checkout@v3
38-
- name: Setup
39-
run: |
40-
yum -y update && yum -y install git make curl
38+
uses: actions/checkout@v4
39+
- name: Setup
40+
run: |
41+
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && apt-get -q install -y make curl wget
4142
- name: Test
4243
run: |
4344
make test

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let package = Package(
1919
)
2020
],
2121
dependencies: [
22-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha.1"),
22+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha.2"),
2323
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "0.1.0"),
2424
.package(url: "https://github.com/soto-project/soto.git", from: "6.7.0"),
2525
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),

Sources/BreezeLambdaAPI/APIGatewayV2Response+Extensions.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
import struct AWSLambdaEvents.APIGatewayV2Response
16-
import struct AWSLambdaEvents.HTTPResponseStatus
16+
import HTTPTypes
1717
import class Foundation.JSONEncoder
1818

1919
extension APIGatewayV2Response {
@@ -31,7 +31,7 @@ extension APIGatewayV2Response {
3131
/// - Parameters:
3232
/// - error: Error
3333
/// - statusCode: HTTP Status Code
34-
init(with error: Error, statusCode: AWSLambdaEvents.HTTPResponseStatus) {
34+
init(with error: Error, statusCode: HTTPResponse.Status) {
3535
let bodyError = BodyError(error: String(describing: error))
3636
self.init(with: bodyError, statusCode: statusCode)
3737
}
@@ -40,7 +40,7 @@ extension APIGatewayV2Response {
4040
/// - Parameters:
4141
/// - object: Encodable Object
4242
/// - statusCode: HTTP Status Code
43-
init<Output: Encodable>(with object: Output, statusCode: AWSLambdaEvents.HTTPResponseStatus) {
43+
init<Output: Encodable>(with object: Output, statusCode: HTTPResponse.Status) {
4444
var body = "{}"
4545
if let data = try? Self.encoder.encode(object) {
4646
body = String(data: data, encoding: .utf8) ?? body

0 commit comments

Comments
 (0)