Skip to content

[CI] Add GHA CI and release flow #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ignore-unacceptable-language inline
  • Loading branch information
fabianfett committed Aug 26, 2024
commit 8e795b7da72dcb9eb48ee717fd283fec2e650790
3 changes: 0 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ jobs:
uses: apple/swift-nio/.github/workflows/soundness.yml@main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it on purpose that we reference files from Swift NIO project ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!

with:
license_header_check_project_name: "SwiftAWSLambdaRuntime"
# remove "kill killed" from the default list for now
unacceptable_language_check_word_list:
"blacklist whitelist slave master sane sanity insane insanity killing hang hung hanged hanging"

unit-tests:
name: Unit tests
Expand Down
2 changes: 1 addition & 1 deletion Sources/AWSLambdaRuntimeCore/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum Signal: Int32 {
case INT = 2
case QUIT = 3
case ABRT = 6
case KILL = 9
case KILL = 9 // ignore-unacceptable-language
case ALRM = 14
case TERM = 15
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/AWSLambdaRuntimeCoreTests/LambdaTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class LambdaTest: XCTestCase {
// we need to schedule the signal before we start the long running `Lambda.run`, since
// `Lambda.run` will block the main thread.
usleep(100_000)
kill(getpid(), signal.rawValue)
kill(getpid(), signal.rawValue) // ignore-unacceptable-language
}
let result = Lambda.run(configuration: configuration, handlerType: EchoHandler.self)

Expand Down
10 changes: 5 additions & 5 deletions scripts/performance_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ swift build --package-path Examples/Echo -c release -Xswiftc -g
swift build --package-path Examples/JSON -c release -Xswiftc -g

cleanup() {
kill -9 $server_pid
kill -9 $server_pid # ignore-unacceptable-language
}

trap "cleanup" ERR
Expand All @@ -47,12 +47,12 @@ results=()
export MODE=string

# start (fork) mock server
pkill -9 MockServer && echo "killed previous servers" && sleep 1
pkill -9 MockServer && echo "killed previous servers" && sleep 1 # ignore-unacceptable-language
echo "starting server in $MODE mode"
(./.build/release/MockServer) &
server_pid=$!
sleep 1
kill -0 $server_pid # check server is alive
kill -0 $server_pid # check server is alive # ignore-unacceptable-language

# cold start
echo "running $MODE mode cold test"
Expand Down Expand Up @@ -85,12 +85,12 @@ results+=( "$MODE, warm: $avg_warm (ns)" )
export MODE=json

# start (fork) mock server
pkill -9 MockServer && echo "killed previous servers" && sleep 1
pkill -9 MockServer && echo "killed previous servers" && sleep 1 # ignore-unacceptable-language
echo "starting server in $MODE mode"
(./.build/release/MockServer) &
server_pid=$!
sleep 1
kill -0 $server_pid # check server is alive
kill -0 $server_pid # check server is alive # ignore-unacceptable-language

# cold start
echo "running $MODE mode cold test"
Expand Down