Skip to content

docs/Add API docs generator and update scripts (#220) #262

docs/Add API docs generator and update scripts (#220)

docs/Add API docs generator and update scripts (#220) #262

name: TypeScript Integration Tests
on:
workflow_dispatch:
workflow_call:
push:
branches: [main, "release/*"]
paths:
# TS SDK changes
- "sdks/ts/**"
# Backend changes that affect TS integration
- "crates/**"
- "Cargo.*"
- "Makefile"
- ".github/workflows/typescript-integration.yml"
pull_request:
branches: [main, "release/*"]
paths:
# TS SDK changes
- "sdks/ts/**"
# Backend changes that affect TS integration
- "crates/**"
- "Cargo.*"
- "Makefile"
- ".github/workflows/typescript-integration.yml"
env:
CARGO_TERM_COLOR: always
RUST_LOG: info
jobs:
typescript-integration:
name: TypeScript SDK Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: "typescript-integration"
cache-on-failure: true
- name: Setup Solana CLI
uses: ./.github/actions/setup-solana
- name: Setup Kora RPC server
uses: ./.github/actions/setup-kora-rpc
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.12.3
run_install: false
- name: Get pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('sdks/ts/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-
- name: Install TypeScript dependencies
working-directory: sdks/ts
run: pnpm install --frozen-lockfile
- name: Build TypeScript SDK
working-directory: sdks/ts
run: pnpm build
- name: Run TypeScript integration tests
working-directory: sdks/ts
run: |
echo "🧪 Running TypeScript SDK integration tests..."
# The test script handles starting/stopping its own validator
pnpm test:ci:integration
- name: Stop Kora RPC server
run: |
if [ ! -z "$KORA_PID" ]; then
kill $KORA_PID || true
fi
sleep 2
- name: Setup Kora RPC server (auth config)
uses: ./.github/actions/setup-kora-rpc
with:
config-file: "tests/src/common/fixtures/auth-test.toml"
- name: Run TypeScript auth integration tests
working-directory: sdks/ts
run: |
echo "🧪 Running TypeScript SDK auth integration tests..."
pnpm test:ci:integration:auth
- name: Cleanup test environment
uses: ./.github/actions/cleanup-test-env
- name: Show failure logs
uses: ./.github/actions/show-failure-logs
with:
test-type: "TypeScript integration"