Skip to content

feat: wasm32 http client #238

feat: wasm32 http client

feat: wasm32 http client #238

Workflow file for this run

name: API OAS Generator CI
# This workflow tests the OpenAPI Specification (OAS) generator in the api/ folder.
# It validates the Python-based Jinja2 generator, ensures generated Rust code compiles,
# and checks for output stability. Both algod and indexer clients are tested in parallel.
on:
push:
branches:
- main
paths:
- "api/**"
- "tools/api_tools/**"
- "crates/algod_client/**"
- "crates/indexer_client/**"
- ".github/workflows/api_ci.yml"
pull_request:
branches:
- main
paths:
- "api/**"
- "tools/api_tools/**"
- "crates/algod_client/**"
- "crates/indexer_client/**"
- ".github/workflows/api_ci.yml"
workflow_dispatch:
permissions:
contents: read
jobs:
oas_lint_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-api-tools
- name: Run OAS generator linting
run: cargo api lint-oas
- name: Run OAS generator tests
run: cargo api test-oas
api_client_generation:
runs-on: ubuntu-latest
needs: oas_lint_and_test
strategy:
matrix:
client: [algod, indexer, kmd]
include:
- client: algod
output_dir: crates/algod_client
- client: indexer
output_dir: crates/indexer_client
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-api-tools
- name: Generate ${{ matrix.client }} API client
run: cargo api generate-${{ matrix.client }}
- name: Check for output stability
run: |
git add -N ${{ matrix.output_dir }}
if ! git diff --exit-code --minimal ${{ matrix.output_dir }}; then
echo "❌ Generated ${{ matrix.client }} client differs from committed version!"
echo "🔧 To fix: Run 'cargo api generate-${{ matrix.client }}' locally and commit the changes"
exit 1
fi
- name: Verify generated code compiles
run: cargo check --manifest-path Cargo.toml -p ${{ matrix.client }}_client