-
Notifications
You must be signed in to change notification settings - Fork 8
Update sdk featues in new releases #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
fbded96
updating sdk features
yaanakbr 72115c7
changes
yaanakbr 9169eee
changes
yaanakbr b03f4c7
space
yaanakbr fa07095
push
yaanakbr cf7e99d
space
yaanakbr 8e0caf8
trying to get bugbot to run
yaanakbr 2c72662
space
yaanakbr 154d498
space
yaanakbr df2f1f9
changes
yaanakbr 742f22c
Changes
yaanakbr 4e3ed2f
changes
yaanakbr f390a60
changes
yaanakbr 013371f
changes
yaanakbr 94f1fcf
changes
yaanakbr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| jobs: | ||
| changes: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| outputs: | ||
| typescript: ${{ steps.filter.outputs.typescript }} | ||
| python: ${{ steps.filter.outputs.python }} | ||
| rust: ${{ steps.filter.outputs.rust }} | ||
| go: ${{ steps.filter.outputs.go }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dorny/paths-filter@v3 | ||
| id: filter | ||
| with: | ||
| filters: | | ||
| typescript: | ||
| - 'typescript/**' | ||
| - '.github/workflows/ci.yml' | ||
| python: | ||
| - 'python/**' | ||
| - '.github/workflows/ci.yml' | ||
| rust: | ||
| - 'rust/**' | ||
| - '.github/workflows/ci.yml' | ||
| go: | ||
| - 'go/**' | ||
| - '.github/workflows/ci.yml' | ||
|
|
||
| typescript: | ||
| needs: changes | ||
| if: needs.changes.outputs.typescript == 'true' | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: typescript | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: npm | ||
| cache-dependency-path: typescript/package-lock.json | ||
| - run: npm ci | ||
| - run: npm run typecheck | ||
| - run: npm test | ||
| - run: npm run build | ||
|
|
||
| python: | ||
| needs: changes | ||
| if: needs.changes.outputs.python == 'true' | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: python | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
| - run: pip install -e ".[dev]" | ||
| - run: pytest | ||
|
|
||
| rust: | ||
| needs: changes | ||
| if: needs.changes.outputs.rust == 'true' | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: rust | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: rust | ||
| - run: cargo build | ||
| - run: cargo test | ||
|
|
||
| go: | ||
| needs: changes | ||
| if: needs.changes.outputs.go == 'true' | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: go | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go/go.mod | ||
| cache-dependency-path: go/go.sum | ||
| - run: go build ./... | ||
| - run: go test ./... | ||
|
|
||
| # Single required status check: always runs, passes when every language job | ||
| # either succeeded or was skipped (not touched by the PR). Make THIS job the | ||
| # required check in branch protection — the per-language jobs are skipped on | ||
| # PRs that don't touch them and would otherwise hang as "pending" forever. | ||
| ci-ok: | ||
| needs: [changes, typescript, python, rust, go] | ||
| if: always() | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check job results | ||
| run: | | ||
| results="${{ needs.typescript.result }} ${{ needs.python.result }} ${{ needs.rust.result }} ${{ needs.go.result }} ${{ needs.changes.result }}" | ||
| echo "Job results: $results" | ||
| for r in $results; do | ||
| if [ "$r" = "failure" ] || [ "$r" = "cancelled" ]; then | ||
| echo "::error::A CI job failed or was cancelled." | ||
| exit 1 | ||
| fi | ||
| done | ||
| echo "All CI jobs passed or were skipped." | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Publish Go | ||
|
|
||
| # Go modules are published by the tag itself — the Go module proxy serves | ||
| # go/vX.Y.Z directly from GitHub. This workflow is just a release gate. | ||
| on: | ||
| push: | ||
| tags: | ||
| - 'go/v*' | ||
|
|
||
| jobs: | ||
| release-gate: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| defaults: | ||
| run: | ||
| working-directory: go | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go/go.mod | ||
| cache-dependency-path: go/go.sum | ||
| - run: go build ./... | ||
| - run: go test ./... | ||
|
|
||
| - name: Release info | ||
| run: | | ||
| VERSION="${GITHUB_REF_NAME#go/}" | ||
| echo "Go module released. Users can install it with:" | ||
| echo | ||
| echo " go get github.com/quiknode-labs/hyperliquid-sdk/go@$VERSION" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Publish Python | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'python/v*' | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| environment: pypi | ||
| permissions: | ||
| contents: read | ||
| id-token: write # PyPI Trusted Publishing | ||
| defaults: | ||
| run: | ||
| working-directory: python | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: Assert tag matches pyproject.toml version | ||
| run: | | ||
| TAG_VERSION="${GITHUB_REF_NAME#python/v}" | ||
| PROJECT_VERSION="$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")" | ||
| if [ "$TAG_VERSION" != "$PROJECT_VERSION" ]; then | ||
| echo "::error::Tag version ($TAG_VERSION) does not match python/pyproject.toml version ($PROJECT_VERSION)." | ||
| echo "Bump pyproject.toml or re-tag, then push again." | ||
| exit 1 | ||
| fi | ||
| echo "Version check OK: $PROJECT_VERSION" | ||
|
|
||
| - run: pip install -e ".[dev]" | ||
| - run: pytest | ||
|
|
||
| - name: Build sdist and wheel | ||
| run: | | ||
| rm -rf dist | ||
| pip install build | ||
| python -m build | ||
|
|
||
| - name: Publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| packages-dir: python/dist/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Publish Rust | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'rust/v*' | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| defaults: | ||
| run: | ||
| working-directory: rust | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: rust | ||
|
|
||
| - name: Assert tag matches Cargo.toml version | ||
| run: | | ||
| TAG_VERSION="${GITHUB_REF_NAME#rust/v}" | ||
| CRATE_VERSION="$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')" | ||
| if [ "$TAG_VERSION" != "$CRATE_VERSION" ]; then | ||
| echo "::error::Tag version ($TAG_VERSION) does not match rust/Cargo.toml version ($CRATE_VERSION)." | ||
| echo "Bump Cargo.toml or re-tag, then push again." | ||
| exit 1 | ||
| fi | ||
| echo "Version check OK: $CRATE_VERSION" | ||
|
|
||
| - run: cargo test | ||
|
|
||
| - run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Publish TypeScript | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'typescript/v*' | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write # npm --provenance | ||
| defaults: | ||
| run: | ||
| working-directory: typescript | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: npm | ||
| cache-dependency-path: typescript/package-lock.json | ||
| registry-url: https://registry.npmjs.org | ||
|
|
||
| - name: Assert tag matches package.json version | ||
| run: | | ||
| TAG_VERSION="${GITHUB_REF_NAME#typescript/v}" | ||
| PKG_VERSION="$(node -p "require('./package.json').version")" | ||
| if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then | ||
| echo "::error::Tag version ($TAG_VERSION) does not match typescript/package.json version ($PKG_VERSION)." | ||
| echo "Bump package.json or re-tag, then push again." | ||
| exit 1 | ||
| fi | ||
| echo "Version check OK: $PKG_VERSION" | ||
|
|
||
| - run: npm ci | ||
| - run: npm run typecheck | ||
| - run: npm test | ||
| - run: npm run build | ||
|
|
||
| # prepublishOnly re-runs the build; that's fine. | ||
| - run: npm publish --provenance --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.