Skip to content

Commit

Permalink
Unset Bun integration test timeout and automatically retry 3 times (#230
Browse files Browse the repository at this point in the history
)

* Unset Bun integration test timeout

* Automatically retry bun test

* Add log statements for received events
  • Loading branch information
mattt authored Mar 19, 2024
1 parent be0fcee commit f7e561c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,7 @@ jobs:
cd integration/${{ matrix.suite }}
bun uninstall replicate
bun install "file:../../${{ needs.build.outputs.tarball-name }}"
bun test --timeout 30000
retries=3
for ((i=0; i<retries; i++)); do
bun test && break || echo "Test failed, retrying..."
done
1 change: 1 addition & 0 deletions integration/bun/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default async function main() {
const output = [];

for await (const { event, data } of replicate.stream(model, options)) {
console.log({ event, data });
if (event === "output") {
output.push(data);
}
Expand Down

0 comments on commit f7e561c

Please sign in to comment.