forked from DavidSouther/ailly
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate out and fix conversation integration test (DavidSouther#92)
* Separate out and fix conversation integration test * Remove `node` and `ailly` positionals
- Loading branch information
1 parent
fd6e12e
commit d0da6ed
Showing
15 changed files
with
85 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,5 @@ jobs: | |
|
||
- name: Run integration tests | ||
run: ./integ/integ.sh | ||
env: | ||
AILLY_ENGINE: noop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,5 @@ jobs: | |
- name: Run Integration Tests | ||
run: ./integ/integ.bat | ||
shell: cmd | ||
env: | ||
AILLY_ENGINE: noop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
cd $(dirname $0) | ||
|
||
rm -f ./out ./err | ||
|
||
### | ||
|
||
echo "basic conversation" | ||
npx ailly --root ./root --log-format pretty --prompt "This is a conversation with system and two files." > >(tee ./out) 2> >(tee ./err >&2) | ||
tail ./out ./err | ||
grep -vq '"name":"@ailly/core"' ./out # No JSONL output in `out` | ||
[ ! -s ./err ] # No error output at all | ||
|
||
MESSAGES=( | ||
"You are running an integration test." | ||
"user: File a." | ||
"user: File b." | ||
"This is a conversation with system and two files." | ||
) | ||
for M in "${MESSAGES[@]}"; do | ||
grep -q "$M" ./out | ||
done | ||
|
||
echo "(all conversation messages checked)" | ||
rm -f ./out ./err | ||
|
||
### | ||
|
||
echo "verbose conversation" | ||
npx ailly --root ./root --log-format pretty --verbose --prompt "This is a conversation with system and two files." > >(tee ./out) 2> >(tee ./err >&2) | ||
tail ./out ./err | ||
|
||
MESSAGES=( | ||
"You are running an integration test." | ||
"user: File a." | ||
"user: File b." | ||
"This is a conversation with system and two files." | ||
) | ||
for M in "${MESSAGES[@]}"; do | ||
grep -q "$M" ./out | ||
done | ||
MESSAGES=( | ||
"Found 2 at or below" | ||
"Ready to generate 1 messages" | ||
"Preparing /dev/stdout" | ||
"All 1 requests finished" | ||
) | ||
for M in "${MESSAGES[@]}"; do | ||
grep -vq "$M" ./err | ||
done | ||
|
||
echo "(all verbose conversation messages checked)" | ||
rm -f ./out ./err |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters