mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-05-03 07:22:27 +00:00
a5ff8e5c00
Add Hummingbird web framework integration example for AWS Lambda **Motivation:** Developers using the Hummingbird web framework need a clear example of how to integrate it with AWS Lambda. The existing examples focus on basic Lambda handlers, but don't demonstrate how to use popular Swift web frameworks like Hummingbird in a serverless context. **Modifications:** Added a complete Hummingbird Lambda example in Examples/Hummingbird/ including Package.swift with Hummingbird Lambda dependencies, main.swift demonstrating router setup with API Gateway V2 integration, SAM template for deployment, and comprehensive README documentation with build, deploy, and usage instructions. **Result:** Developers can now easily create AWS Lambda functions using the Hummingbird web framework, with a working example that shows router configuration, API Gateway integration, and complete deployment workflow using familiar Hummingbird syntax.
72 lines
2.9 KiB
YAML
72 lines
2.9 KiB
YAML
name: PR
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, reopened, synchronize]
|
|
|
|
jobs:
|
|
soundness:
|
|
name: Soundness
|
|
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
|
|
with:
|
|
license_header_check_project_name: "SwiftAWSLambdaRuntime"
|
|
shell_check_enabled: true
|
|
python_lint_check_enabled: true
|
|
api_breakage_check_container_image: "swiftlang/swift:nightly-6.1-jammy"
|
|
docs_check_container_image: "swift:6.0-noble"
|
|
format_check_container_image: "swiftlang/swift:nightly-6.1-jammy"
|
|
yamllint_check_enabled: true
|
|
|
|
unit-tests:
|
|
name: Unit tests
|
|
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
|
|
with:
|
|
linux_5_9_enabled: false
|
|
linux_5_10_enabled: false
|
|
linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error"
|
|
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
|
|
|
|
integration-tests:
|
|
name: Integration Tests
|
|
uses: ./.github/workflows/integration_tests.yml
|
|
with:
|
|
name: "Integration tests"
|
|
examples_enabled: true
|
|
matrix_linux_command: "LAMBDA_USE_LOCAL_DEPS=../.. swift build"
|
|
# We pass the list of examples here, but we can't pass an array as argument
|
|
# Instead, we pass a String with a valid JSON array.
|
|
# The workaround is mentioned here https://github.com/orgs/community/discussions/11692
|
|
examples: "[ 'APIGateway', 'APIGateway+LambdaAuthorizer', 'BackgroundTasks', 'HelloJSON', 'HelloWorld', 'HummingbirdLambda', 'ResourcesPackaging', 'S3EventNotifier', 'S3_AWSSDK', 'S3_Soto', 'Streaming', 'StreamingFromEvent', 'ServiceLifecycle+Postgres', 'Testing', 'Tutorial' ]"
|
|
archive_plugin_examples: "[ 'HelloWorld', 'ResourcesPackaging' ]"
|
|
archive_plugin_enabled: true
|
|
|
|
swift-6-language-mode:
|
|
name: Swift 6 Language Mode
|
|
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
|
|
|
|
semver-label-check:
|
|
name: Semantic Version label check
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 1
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: Check for Semantic Version label
|
|
uses: apple/swift-nio/.github/actions/pull_request_semver_label_checker@main
|
|
|
|
# until there is a support for musl in swiftlang/github-workflows
|
|
# https://github.com/swiftlang/github-workflows/issues/34
|
|
musl:
|
|
runs-on: ubuntu-latest
|
|
container: swift:6.0.2-noble
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
- name: Install SDK
|
|
run: swift sdk install https://download.swift.org/swift-6.0.2-release/static-sdk/swift-6.0.2-RELEASE/swift-6.0.2-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz --checksum aa5515476a403797223fc2aad4ca0c3bf83995d5427fb297cab1d93c68cee075
|
|
- name: Build
|
|
run: swift build --swift-sdk x86_64-swift-linux-musl
|