Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
68 changes: 68 additions & 0 deletions .github/workflows/sdk-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: SDK CI

on:
pull_request:
paths:
- "packages/sdk-typescript/**"
- ".github/workflows/sdk-ci.yml"
push:
branches: [main]
paths:
- "packages/sdk-typescript/**"
- ".github/workflows/sdk-ci.yml"

permissions:
contents: read

defaults:
run:
working-directory: packages/sdk-typescript

jobs:
build-and-test:
runs-on: gha-runner-scale-set-standard
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22"

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Typecheck
run: npm run typecheck

- name: Test
run: npm test

- name: Require Changeset
run: npm run verify:changeset
if: github.event_name == 'pull_request'
- name: Verify package (browser imports + bundle + pack)
run: npm run verify:package

- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
continue-on-error: true
with:
bun-version: "1.x"

- name: Setup Deno
uses: denoland/setup-deno@4606d5cc6fb3f673efd4f594850e3f4b3e9d29cd # v2
continue-on-error: true
with:
deno-version: v2.x

- name: Verify multi-runtime (Node, Bun, Deno)
run: npm run verify:runtimes
continue-on-error: true
55 changes: 55 additions & 0 deletions .github/workflows/sdk-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: SDK Release

on:
push:
branches: [main]
paths:
- "packages/sdk-typescript/package.json"
- "packages/sdk-typescript/.changeset/**"

permissions:
contents: write
pull-requests: write
id-token: write

defaults:
run:
working-directory: packages/sdk-typescript

jobs:
release:
runs-on: gha-runner-scale-set-standard
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0

- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm test

- name: Verify package
run: npm run verify:package

- name: Create Release Pull Request or Publish
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9
with:
version: npx --no-install changeset version
publish: npm publish --tag beta --provenance
cwd: packages/sdk-typescript
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
74 changes: 74 additions & 0 deletions .github/workflows/sdk-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: SDK Smoke Test

on:
workflow_dispatch:
inputs:
environment:
description: "Target environment"
required: true
default: "sandbox"
type: choice
options:
- sandbox
- production
market-type:
description: "Market type to smoke test"
required: true
default: "market-data"
type: choice
options:
- market-data
- prediction-markets

permissions:
contents: read

defaults:
run:
working-directory: packages/sdk-typescript

jobs:
smoke:
runs-on: gha-runner-scale-set-standard
timeout-minutes: 10

steps:
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0

- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22"

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run smoke test
run: |
GEMINI_SMOKE_ENV=${{ inputs.environment }} \
node scripts/smoke-sandbox.mjs --market-type=${{ inputs.market-type }}
Comment thread
gl00mt1t4n marked this conversation as resolved.
Dismissed
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GEMINI_API_SECRET: ${{ secrets.GEMINI_API_SECRET }}

- name: Verify REST operations
if: inputs.environment == 'sandbox'
run: |
GEMINI_SMOKE_ENV=sandbox \
node scripts/verify-sandbox-rest.mjs
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GEMINI_API_SECRET: ${{ secrets.GEMINI_API_SECRET }}

- name: Verify market data
if: inputs.market-type == 'market-data'
run: |
GEMINI_MD_ENV=${{ inputs.environment }} \
node scripts/verify-market-data-live.mjs
Comment thread
gl00mt1t4n marked this conversation as resolved.
Dismissed
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GEMINI_API_SECRET: ${{ secrets.GEMINI_API_SECRET }}
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@ venv/
tmp/
.tmp/

# SDK generation
# SDK generation (auto-generated — sdk-typescript is committed)
scripts/rest.yaml
packages/sdk-go/
packages/sdk-python/
packages/sdk-typescript/


# AI
.claude/
8 changes: 8 additions & 0 deletions packages/sdk-typescript/.changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets).

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
10 changes: 10 additions & 0 deletions packages/sdk-typescript/.changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch"
}
5 changes: 5 additions & 0 deletions packages/sdk-typescript/.changeset/initial-gemini-markets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@gemini-markets/sdk": minor
---

Initial public release of the Gemini Markets TypeScript SDK.
8 changes: 8 additions & 0 deletions packages/sdk-typescript/.changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@gemini-markets/sdk": "0.0.0"
},
"changesets": []
}
2 changes: 2 additions & 0 deletions packages/sdk-typescript/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
Loading
Loading