-
Notifications
You must be signed in to change notification settings - Fork 55
test: run examples end to end against the live API #374
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
Open
jbeckwith-oai
wants to merge
16
commits into
main
Choose a base branch
from
codex/examples-e2e-coverage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3d25094
test examples against the live API
jbeckwith-oai f4dc6d7
test: make coverage regression deterministic
jbeckwith-oai 0046642
fix: fully escape example reports
jbeckwith-oai e81c58c
test: simplify example end-to-end coverage
jbeckwith-oai 0580ee5
test: tighten example inventory validation
jbeckwith-oai 7b3a8fc
fix: address example E2E review feedback
jbeckwith-oai 00ba2d1
fix: validate example output thresholds
jbeckwith-oai 88280ec
fix: protect live example workflow
jbeckwith-oai 198959e
fix: tighten example e2e completion checks
jbeckwith-oai f0b69ba
fix: require complete example streams
jbeckwith-oai d70a151
fix: reject incomplete example results
jbeckwith-oai 3f72c32
fix: keep standalone examples runtime-clean
jbeckwith-oai 26f8bb7
fix: verify generated image payload
jbeckwith-oai 74e3457
fix: require streamed terminal states
jbeckwith-oai c82334a
fix: require structured stream completion
jbeckwith-oai 759cb2b
fix: validate legacy streams and tool calls
jbeckwith-oai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,41 @@ | ||
| name: Examples E2E | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| examples-e2e: | ||
| name: live Ruby examples | ||
| if: >- | ||
| github.ref == 'refs/heads/main' && | ||
| github.repository == 'openai/openai-ruby' | ||
| runs-on: ubuntu-latest | ||
| environment: ci | ||
| timeout-minutes: 90 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| persist-credentials: false | ||
| ref: ${{ github.sha }} | ||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1 | ||
| with: | ||
| ruby-version: "4.0" | ||
| bundler-cache: true | ||
| - name: Run examples against the live API | ||
| env: | ||
| EXAMPLES_E2E_REPORT_DIR: ${{ runner.temp }}/examples-e2e | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
jbeckwith-oai marked this conversation as resolved.
|
||
| run: bundle exec rake test:examples:e2e | ||
|
jbeckwith-oai marked this conversation as resolved.
|
||
| - name: Upload example result reports | ||
| if: ${{ always() }} | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: examples-e2e-${{ github.run_id }} | ||
| path: ${{ runner.temp }}/examples-e2e | ||
| if-no-files-found: warn | ||
| retention-days: 14 | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -9,3 +9,4 @@ bin/tapioca | |
| Brewfile.lock.json | ||
| doc/ | ||
| sorbet/tapioca/* | ||
| tmp/ | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.