mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-05-03 07:22:27 +00:00
3b72f6a6cf
motivation: examples can be confusing since they use relative path to the library for CI purposes changes: * update examples to use the library URL, expect when env variable is set for CI purposes * rename docker compose job to test-examples since it is more accurate
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
# this file is not designed to be run directly
|
|
# instead, use the docker-compose.<os>.<swift> files
|
|
# eg docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.al2.57.yaml run test
|
|
version: "3"
|
|
|
|
services:
|
|
|
|
runtime-setup:
|
|
image: swift-aws-lambda:default
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
|
|
common: &common
|
|
image: swift-aws-lambda:default
|
|
depends_on: [runtime-setup]
|
|
volumes:
|
|
- ~/.ssh:/root/.ssh
|
|
- ..:/code:z
|
|
working_dir: /code
|
|
cap_drop:
|
|
- CAP_NET_RAW
|
|
- CAP_NET_BIND_SERVICE
|
|
|
|
soundness:
|
|
<<: *common
|
|
command: /bin/bash -cl "./scripts/soundness.sh"
|
|
|
|
test:
|
|
<<: *common
|
|
command: /bin/bash -cl "swift test -Xswiftc -warnings-as-errors $${SANITIZER_ARG-}"
|
|
|
|
test-examples:
|
|
<<: *common
|
|
command: >-
|
|
/bin/bash -clx "
|
|
LAMBDA_USE_LOCAL_DEPS=true swift build --package-path Examples/Benchmark &&
|
|
LAMBDA_USE_LOCAL_DEPS=true swift build --package-path Examples/Deployment &&
|
|
LAMBDA_USE_LOCAL_DEPS=true swift build --package-path Examples/Echo &&
|
|
LAMBDA_USE_LOCAL_DEPS=true swift build --package-path Examples/ErrorHandling &&
|
|
LAMBDA_USE_LOCAL_DEPS=true swift build --package-path Examples/Foundation &&
|
|
LAMBDA_USE_LOCAL_DEPS=true swift build --package-path Examples/JSON &&
|
|
LAMBDA_USE_LOCAL_DEPS=true swift build --package-path Examples/LocalDebugging/MyLambda &&
|
|
LAMBDA_USE_LOCAL_DEPS=true swift test --package-path Examples/Testing
|
|
"
|
|
|
|
# util
|
|
|
|
shell:
|
|
<<: *common
|
|
entrypoint: /bin/bash -l
|