Migrate all unti tests to Swift Testing
### Motivation:
Allows to compile and run test on open source Swift toolchain 6
### Modifications:
Migrate according to
https://developer.apple.com/documentation/testing/migratingfromxctest
### Result:
```
Test run with 101 tests passed after 0.012 seconds.
```
motivation: the runtime library has a stabel API while the events are still moving target, so in order to provide a 1.0 stable version we should separate them out
changes:
* import events module from the swift-aws-lambda-runtime, including git history
* update docker setup
* remove redundant examples and scripts
Modifications:
- Replace `HTTPHandler` with `NIOHTTPClientResponseAggregator`, to fix a CoW issue. This increases performance.
- Ensure that we only use one `EventLoop` in tests.
- Use `syncOperations` to setup the `HTTPClient`.
motivation: align with swift project coc update
changes: update coc to the version used by the swift project (contributor-covenant.org 1.4)
Update 0226-package-manager-target-based-dep-resolution.md
Co-authored-by: Konrad `ktoso` Malawski <ktoso@apple.com>
motivation: keep script up to date
changes:
* use 5.3 nightly
* better support for perf symlink as the location is a moving target
* info about cold/warm start
motivation: demonstrate how to deploy with SAM
changes:
* Add a SAM template for deploying the lambdas to AWS.
* Updated README with instructions on how to do this.
motivation: easier to reason about examples
changes:
* move each example to its own target
* update deployment script to prompt for desired target when multiple targets exist
* add code comments on what the example is about
* add feature-reach example (CurrencyExchange) to help testing use of Foundation features that require curl and libxml
motivation: unique, accurate name
changes:
* rename project to SwiftAWSLambdaRuntime
* rename main module to AWSLambdaRuntime
* rename / simplify sample module names
* adjust readme and scripts
motivation: amazon linux support will land in 5.2
changes:
* remove inline as its default in 5.2
* remove linux test and lean on --enable-test-discovery
* adjust package syntax
* format code to match 5.2
motivation: enable CI
changes: add docker files support for ubuntu 16.04 and 18.04 and swift 5.0 and 5.1
note that eventyally this will need to move to AL2 docker images, but we dont have official ones yet
motivation: better performance
changes:
* simply url configuration to ip and port so we can reoslve the socket add ress faster
* skip happy eyeballs
* limit eventloop group to 1 thread
* remove use of UUID and URL
* fix backtrace url
motivation: benchmark for comparison of warm/cold runs
changes:
* refactor configuration
* add mock server that can be used by perf tests
* add simple perf test script
* change redundant classes to structs, make remaining classes final
* make offloading opt-in
* safer locking
* fix format
motivation: make code simpler to reason about, better use of swift-nio
changes:
* remove main loop on global queue + wait, replace with recursion
* make better use of EvenLoopFuture, instead of result types to signal errors
* inject lifecycleId so we can share offloading queue
* improve logging
* adjust and improve tests
* update sanity and generate linux tests script to work better with dates and swiftformat