Skip to content
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

chore: Prevent node 20 from running on AL2, fix transcribe expectation #1607

Merged
merged 5 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ jobs:
version:
- "5.9"
- "5.10"
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- name: Checkout aws-sdk-swift
uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ jobs:
version:
- "5.9"
- "5.10"
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- name: Configure AWS Credentials for Integration Tests
# configure-aws-credentials@v4 does not work with AL2 images, so @v3 is used instead. See:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class TranscribeStreamingTests: XCTestCase {
let audioURL = Bundle.module.url(forResource: "hello-swift", withExtension: "wav")!
let audioData = try Data(contentsOf: audioURL)

// A delay will be imposed between chunks to keep the audio streaming to the Teranscribe
// A delay will be imposed between chunks to keep the audio streaming to the Transcribe
// service at approximately real-time.
let duration = 2.976
let chunkSize = 4096
Expand Down Expand Up @@ -70,6 +70,16 @@ final class TranscribeStreamingTests: XCTestCase {
}
}

XCTAssertEqual("Hello transcribed streaming from swift sdk.", fullMessage)
// All of the following are acceptable results for the transcription, without
// regard to capitalization.
//
// Due to changes to the transcription logic, all of these have been returned
// as the transcription at some point.
let candidates = [
"Hello transcribed streaming from Swift S. D. K.",
"Hello transcribed streaming from swift sdk.",
"Hello transcribes streaming from Swift SDK.",
]
XCTAssertTrue(candidates.contains(where: { $0.lowercased() == fullMessage.lowercased() }))
}
}
Loading