Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3363aea
test: real provider
hanakannzashi Dec 28, 2025
d7007bf
fix: types
hanakannzashi Dec 29, 2025
0e29528
refactor: test
hanakannzashi Dec 30, 2025
fa70df8
refactor: test
hanakannzashi Dec 30, 2025
f87a380
refactor: test
hanakannzashi Dec 30, 2025
8196f3d
test: real_test_signature_signing_address_matches_model_attestation
hanakannzashi Jan 6, 2026
e236973
test: more tests
hanakannzashi Jan 6, 2026
07ae9c1
test: more tests
hanakannzashi Jan 6, 2026
ccd4427
test: more tests
hanakannzashi Jan 6, 2026
d265c9a
test: more tests
hanakannzashi Jan 6, 2026
7a8f696
refactor: rename
hanakannzashi Jan 7, 2026
cc1cba4
test: more tests
hanakannzashi Jan 7, 2026
bfb5b64
test: more tests
hanakannzashi Jan 7, 2026
6913e3d
refactor: tests
hanakannzashi Jan 8, 2026
847170d
fix: setup real provider once
hanakannzashi Jan 13, 2026
cd63398
chore: nextest config
hanakannzashi Jan 13, 2026
d3337cc
chore: nextest config
hanakannzashi Jan 13, 2026
6b3c1ac
chore: real test action
hanakannzashi Jan 14, 2026
896a8a6
chore: fix actions
hanakannzashi Jan 15, 2026
f36e6e5
Merge branch 'main' into test/real-provider
think-in-universe Jan 15, 2026
128e3f3
test: refactor
hanakannzashi Jan 15, 2026
bd7bf28
test: refactor
hanakannzashi Jan 15, 2026
0eeff42
chore: fix action
hanakannzashi Jan 15, 2026
9685aa4
Merge remote-tracking branch 'origin/test/real-provider' into test/re…
hanakannzashi Jan 15, 2026
2aee003
chore: fix action
hanakannzashi Jan 15, 2026
5218044
chore: fix action
hanakannzashi Jan 15, 2026
00dfce3
chore: fix action
hanakannzashi Jan 20, 2026
4bd1739
chore: fix action
hanakannzashi Jan 20, 2026
8483e48
Merge branch 'main' into test/real-provider
hanakannzashi Jan 20, 2026
229bdc1
fix
hanakannzashi Jan 20, 2026
7075f35
fix: test
hanakannzashi Jan 21, 2026
c7ca04a
Merge branch 'main' into test/real-provider
think-in-universe Jan 21, 2026
7c42598
refactor: remove duplicated function
hanakannzashi Jan 21, 2026
20c3f60
Merge remote-tracking branch 'origin/test/real-provider' into test/re…
hanakannzashi Jan 21, 2026
3947ce2
Merge branch 'main' into test/real-provider
think-in-universe Jan 21, 2026
29d49df
chore: fix makefile for tests
hanakannzashi Jan 22, 2026
89f5c88
chore: fix makefile for tests
hanakannzashi Jan 22, 2026
59bfdae
chore: action
hanakannzashi Jan 22, 2026
f52bdeb
chore: error handler for checkout
hanakannzashi Jan 22, 2026
b117aa7
chore: add pull_request tigger for real test action
hanakannzashi Jan 22, 2026
388c6cc
Merge branch 'main' into test/real-provider
PierreLeGuen Feb 4, 2026
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
6 changes: 6 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ test-threads = "num-cpus"

# Longer timeout for e2e tests
slow-timeout = { period = "60s", terminate-after = 2 }

# Override timeout for real e2e tests (5 minutes)
# Matches tests whose function names start with real_test_ (all tests in real_e2e_* files)
[[profile.default.overrides]]
filter = 'test(/^real_test_/)'
slow-timeout = { period = "500s", terminate-after = 1 }
119 changes: 119 additions & 0 deletions .github/workflows/test-real.yml
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 }}
Copy link
Copy Markdown

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.number which is only defined for issue_comment events. When the workflow triggers on pull_request events (opened, ready_for_review), this value is empty, causing gh pr view "" to fail. The existing claude-code-review.yml handles this correctly with github.event.pull_request.number || github.event.issue.number.

Fix in Cursor Fix in Web

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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
# Template DB is created automatically on first test run with all migrations applied
# Each test gets its own database copy for complete isolation
- name: Run integration tests
run: cargo nextest run -p api --tests
run: cargo nextest run -p api --tests -E 'not test(/^real_test_/)'
env:
POSTGRES_PRIMARY_APP_ID: ${{ secrets.POSTGRES_PRIMARY_APP_ID }}
DATABASE_HOST: localhost
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ test: test-unit test-integration

test-unit:
@echo "Running unit tests..."
cargo test --lib --bins
cargo nextest run --lib --bins

test-integration:
@echo "Running integration/e2e tests..."
cargo test --test '*'
cargo nextest run -p api --tests -E 'not test(/^real_test_/)'

test-integration-real:
@echo "Running integration/real_e2e tests..."
cargo nextest run -p api --tests -E 'test(/^real_test_/)'

lint:
@echo "Running clippy linter (strict mode)..."
Expand Down
Loading
Loading