Skip to content

Test hot standby recovery from failures and interruptions #1502

Test hot standby recovery from failures and interruptions

Test hot standby recovery from failures and interruptions #1502

name: TypeScript SDK CI
on:
push:
branches: [main]
paths:
- "sdk-typescript/**"
- "sdk-rust/Cargo.lock"
- "sdk-rust/Cargo.toml"
- "sdk-rust/crates/dex-blob-cache/**"
- "sdk-rust/crates/dex-blob-cache-node/**"
- "cli/**"
- "server-zd/**"
- "s3mock/**"
- "protos/**"
- "web/**"
- ".github/workflows/sdk-typescript-ci.yml"
- ".github/workflows/sdk-typescript-publish.yml"
pull_request:
paths:
- "sdk-typescript/**"
- "sdk-rust/Cargo.lock"
- "sdk-rust/Cargo.toml"
- "sdk-rust/crates/dex-blob-cache/**"
- "sdk-rust/crates/dex-blob-cache-node/**"
- "cli/**"
- "server-zd/**"
- "s3mock/**"
- "protos/**"
- "web/**"
- ".github/workflows/sdk-typescript-ci.yml"
- ".github/workflows/sdk-typescript-publish.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sdk-typescript-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
contracts:
name: User contracts (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["22", "24"]
env:
RUSTUP_TOOLCHAIN: "1.97.1"
defaults:
run:
working-directory: sdk-typescript
steps:
- uses: actions/checkout@v7
- name: Install Rust
run: rustup toolchain install 1.97.1 --profile minimal
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: sdk-typescript/package-lock.json
- name: Install dependencies
run: npm ci
- name: Validate public API documentation
run: npm run docs:check
- name: Check static types
run: npm run typecheck
- name: Test contracts
run: npm test
integration:
name: Integration tests (zd, pull)
runs-on: ubuntu-latest
timeout-minutes: 75
permissions:
contents: read
id-token: write
env:
DEX_INTEG_ENGINE: zd
DEX_SERVER_ZD_BINARY: ${{ github.workspace }}/server-zd/target/debug/dex-server-zd
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
RUST_BACKTRACE: "1"
RUSTUP_TOOLCHAIN: "1.97.1"
CARGO_BUILD_JOBS: "4"
defaults:
run:
working-directory: sdk-typescript
steps:
- uses: actions/checkout@v7
- name: Install Rust
run: rustup toolchain install 1.97.1 --profile minimal
- name: Install libclang for RocksDB
run: sudo apt-get update && sudo apt-get install -y libclang-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: server-zd
shared-key: server-zd-paradedb
save-if: false
- name: Build dex-server-zd
working-directory: server-zd
run: cargo build --locked -p dexzd-server --bin dex-server-zd
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: npm
cache-dependency-path: |
sdk-typescript/package-lock.json
web/package-lock.json
- uses: actions/setup-go@v7
with:
go-version-file: cli/go.mod
cache-dependency-path: |
cli/go.sum
- name: Install dependencies
run: npm ci
- name: Run integration coverage with dexcli dev
run: npm run coverage:integration
- name: Upload TypeScript coverage to Codecov
uses: codecov/codecov-action@v5
with:
disable_search: true
fail_ci_if_error: true
files: ./sdk-typescript/coverage/lcov.info
flags: sdk-typescript-integration-pull
name: sdk-typescript-integration-pull
use_oidc: true
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v7
with:
name: sdk-typescript-integration-coverage-pull
path: sdk-typescript/coverage/
if-no-files-found: ignore
- name: Upload service logs
if: always()
uses: actions/upload-artifact@v7
with:
name: sdk-typescript-integration-services-pull
path: /tmp/test-typescript-sdk-integration-services.log
if-no-files-found: ignore