-
Notifications
You must be signed in to change notification settings - Fork 5
test: required integration test with real provider #316
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
hanakannzashi
wants to merge
41
commits into
main
Choose a base branch
from
test/real-provider
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
41 commits
Select commit
Hold shift + click to select a range
3363aea
test: real provider
hanakannzashi d7007bf
fix: types
hanakannzashi 0e29528
refactor: test
hanakannzashi fa70df8
refactor: test
hanakannzashi f87a380
refactor: test
hanakannzashi 8196f3d
test: real_test_signature_signing_address_matches_model_attestation
hanakannzashi e236973
test: more tests
hanakannzashi 07ae9c1
test: more tests
hanakannzashi ccd4427
test: more tests
hanakannzashi d265c9a
test: more tests
hanakannzashi 7a8f696
refactor: rename
hanakannzashi cc1cba4
test: more tests
hanakannzashi bfb5b64
test: more tests
hanakannzashi 6913e3d
refactor: tests
hanakannzashi 847170d
fix: setup real provider once
hanakannzashi cd63398
chore: nextest config
hanakannzashi d3337cc
chore: nextest config
hanakannzashi 6b3c1ac
chore: real test action
hanakannzashi 896a8a6
chore: fix actions
hanakannzashi f36e6e5
Merge branch 'main' into test/real-provider
think-in-universe 128e3f3
test: refactor
hanakannzashi bd7bf28
test: refactor
hanakannzashi 0eeff42
chore: fix action
hanakannzashi 9685aa4
Merge remote-tracking branch 'origin/test/real-provider' into test/re…
hanakannzashi 2aee003
chore: fix action
hanakannzashi 5218044
chore: fix action
hanakannzashi 00dfce3
chore: fix action
hanakannzashi 4bd1739
chore: fix action
hanakannzashi 8483e48
Merge branch 'main' into test/real-provider
hanakannzashi 229bdc1
fix
hanakannzashi 7075f35
fix: test
hanakannzashi c7ca04a
Merge branch 'main' into test/real-provider
think-in-universe 7c42598
refactor: remove duplicated function
hanakannzashi 20c3f60
Merge remote-tracking branch 'origin/test/real-provider' into test/re…
hanakannzashi 3947ce2
Merge branch 'main' into test/real-provider
think-in-universe 29d49df
chore: fix makefile for tests
hanakannzashi 89f5c88
chore: fix makefile for tests
hanakannzashi 59bfdae
chore: action
hanakannzashi f52bdeb
chore: error handler for checkout
hanakannzashi b117aa7
chore: add pull_request tigger for real test action
hanakannzashi 388c6cc
Merge branch 'main' into test/real-provider
PierreLeGuen 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
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,119 @@ | ||
| name: Real E2E Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [ opened, ready_for_review ] # When PR is ready for review (not draft) | ||
| issue_comment: | ||
| types: [ created ] # Only trigger on PR comments with @tester test | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| RUST_BACKTRACE: 1 | ||
| CARGO_INCREMENTAL: 0 # Faster CI builds | ||
|
|
||
| jobs: | ||
| test_real: | ||
| name: Real E2E Test Suite | ||
| # Only run on: | ||
| # - push / pull_request events, or | ||
| # - issue_comment events where the comment is on a PR and mentions @claude | ||
| if: | | ||
| github.event_name != 'issue_comment' || | ||
| (github.event_name == 'issue_comment' && | ||
| github.event.issue.pull_request && | ||
| github.event.comment.body == 'test') | ||
| runs-on: ubuntu_large_x64 | ||
| environment: Cloud API test env | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read | ||
|
|
||
| services: | ||
| postgres: | ||
| image: postgres:15 | ||
| env: | ||
| POSTGRES_USER: postgres | ||
| POSTGRES_PASSWORD: postgres | ||
| POSTGRES_DB: platform_api | ||
| options: >- | ||
| --health-cmd pg_isready | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
| ports: | ||
| - 5432:5432 | ||
|
|
||
| steps: | ||
| - name: Get PR head SHA | ||
| id: pr-head | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -e | ||
| PR_NUMBER=${{ github.event.issue.number }} | ||
| echo "Fetching PR #${PR_NUMBER} head SHA..." | ||
|
|
||
| if ! PR_HEAD_SHA=$(gh pr view "$PR_NUMBER" --repo ${{ github.repository }} --json headRefOid --jq '.headRefOid' 2>&1); then | ||
| echo "Error: Failed to fetch PR #${PR_NUMBER} information" >&2 | ||
| echo "$PR_HEAD_SHA" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "$PR_HEAD_SHA" ]; then | ||
| echo "Error: PR head SHA is empty for PR #${PR_NUMBER}" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "sha=$PR_HEAD_SHA" >> $GITHUB_OUTPUT | ||
| echo "PR head SHA: $PR_HEAD_SHA" | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ steps.pr-head.outputs.sha }} | ||
|
|
||
| - name: Install Rust | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| components: rustfmt, clippy | ||
|
|
||
| - name: Cache Rust dependencies | ||
| uses: swatinem/rust-cache@v2 | ||
| with: | ||
| cache-on-failure: true | ||
|
|
||
| - name: Install cargo-nextest | ||
| uses: taiki-e/install-action@nextest | ||
|
|
||
| # Run only real_e2e tests (tests with function names starting with real_test_) | ||
| - name: Run real E2E tests | ||
| run: cargo nextest run -p api --tests -E 'test(/^real_test_/)' | ||
| env: | ||
| POSTGRES_PRIMARY_APP_ID: ${{ secrets.POSTGRES_PRIMARY_APP_ID }} | ||
| DATABASE_HOST: localhost | ||
| DATABASE_PORT: 5432 | ||
| DATABASE_NAME: platform_api | ||
| DATABASE_USERNAME: postgres | ||
| DATABASE_PASSWORD: postgres | ||
| DATABASE_MAX_CONNECTIONS: 5 | ||
| DATABASE_TLS_ENABLED: "false" | ||
| MODEL_DISCOVERY_SERVER_URL: ${{ secrets.MODEL_DISCOVERY_SERVER_URL }} | ||
| MODEL_DISCOVERY_API_KEY: ${{ secrets.MODEL_DISCOVERY_API_KEY }} | ||
| AUTH_ENCODING_KEY: ${{ secrets.AUTH_ENCODING_KEY }} | ||
| AUTH_ADMIN_DOMAINS: ${{ secrets.AUTH_ADMIN_DOMAINS }} | ||
| BRAVE_SEARCH_PRO_API_KEY: ${{ secrets.BRAVE_SEARCH_PRO_API_KEY }} | ||
| TEST_TEMPLATE_DATABASE_NAME: platform_api_test_template | ||
| RUST_LOG: debug | ||
| DEV: "true" | ||
|
|
||
| - name: Cleanup orphaned test databases | ||
| if: always() | ||
| continue-on-error: true | ||
| run: cargo test --test cleanup_test_databases -- --ignored --nocapture | ||
| env: | ||
| DATABASE_HOST: localhost | ||
| DATABASE_PORT: 5432 | ||
| DATABASE_USERNAME: postgres | ||
| DATABASE_PASSWORD: postgres | ||
| TEST_TEMPLATE_DATABASE_NAME: platform_api_test_template | ||
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workflow fails on pull_request events due to missing PR number
High Severity
The "Get PR head SHA" step uses
github.event.issue.numberwhich is only defined forissue_commentevents. When the workflow triggers onpull_requestevents (opened, ready_for_review), this value is empty, causinggh pr view ""to fail. The existingclaude-code-review.ymlhandles this correctly withgithub.event.pull_request.number || github.event.issue.number.