Files
swift-aws-lambda-runtime/scripts/integration_tests.sh
T
Sébastien StormacqandFabian Fett 65061a638c Remove docker compose files + add GH action to compile examples during CI (#397)
* add GH action to compile examples on PR

* remove old docker infrastructure


---------


Co-authored-by: Fabian Fett <fabianfett@apple.com>
2024-10-10 11:16:12 +02:00

35 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftAWSLambdaRuntime open source project
##
## Copyright (c) 2017-2018 Apple Inc. and the SwiftAWSLambdaRuntime project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
set -euo pipefail
log() { printf -- "** %s\n" "$*" >&2; }
error() { printf -- "** ERROR: %s\n" "$*" >&2; }
fatal() { error "$@"; exit 1; }
test -n "${SWIFT_VERSION:-}" || fatal "SWIFT_VERSION unset"
test -n "${COMMAND:-}" || fatal "COMMAND unset"
test -n "${EXAMPLE:-}" || fatal "EXAMPLE unset"
swift_version="$SWIFT_VERSION"
command="$COMMAND"
example="$EXAMPLE"
pushd Examples/"$example" > /dev/null
log "Running command with Swift $SWIFT_VERSION"
eval "$command"
popd