feat(hyperliquid): private unWatch methods #12783
Workflow file for this run
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
| name: Go | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: ${{ !startsWith(github.event.head_commit.message, 'Update changelog for') && !startsWith(github.event.head_commit.message, '[Automated changes]') && !contains(github.event.head_commit.message, 'Merge branch ''master'' of https://github.com/ccxt/ccxt') }} | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| if: github.ref == 'refs/heads/master' | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| fetch-depth: 2 | |
| - uses: actions/checkout@v4 | |
| if: github.ref != 'refs/heads/master' | |
| with: | |
| fetch-depth: 2 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.x" | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/go/pkg/mod # module download cache | |
| ~/.cache/go-build # build cache | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install dependencies | |
| run: go mod download | |
| working-directory: ./go | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| - name: Install npm dependencies | |
| run: npm ci --include=dev | |
| - name: Determine modified files | |
| run: ./utils/init_actions.sh | |
| - name: Check tsc version | |
| run: tsc --version | |
| - name: Install tsx | |
| run: npm install -g tsx | |
| - name: export exchanges | |
| run: npm run export-exchanges | |
| - name: Generate implicit API | |
| run: npm run emitAPI # if we emit go only, the implicit API will be problematic for new exchanges | |
| - name: Transpile To Go | |
| if: env.important_modified == 'true' | |
| run: tsx build/goTranspiler.ts && tsx build/goTranspiler.ts --ws | |
| - name: Transpile to Go (specific) | |
| if: env.important_modified == 'false' | |
| # run: | | |
| # cleaned_rest_files=$(echo ${{ env.rest_files }} | tr -s ' ') | |
| # # for exchange in $cleaned_rest_files; do | |
| # # tsx build/goTranspiler.ts -- $exchange | |
| # # done | |
| run : | | |
| # cleaned_rest_files=$(echo ${{ env.rest_files }} | tr -s ' ') | |
| # cleaned_ws_files=$(echo ${{ env.ws_files }} | tr -s ' ') | |
| # # echo "Cleaned files: $cleaned_rest_files" | |
| # # tsx utils/granular-go-build.ts $cleaned_rest_files | |
| # if [ -n "$cleaned_rest_files" ]; then | |
| # echo "Cleaned files: $cleaned_rest_files" | |
| # tsx utils/granular-go-build.ts $cleaned_rest_files | |
| # else | |
| # echo "No rest files to process; skipping." | |
| # fi | |
| # cleaned_ws_files=$(echo ${{ env.ws_files }} | tr -s ' ') | |
| # if [ -n "$cleaned_ws_files" ]; then | |
| # echo "Cleaned files: $cleaned_ws_files" | |
| # tsx utils/granular-go-build.ts $cleaned_ws_files | |
| # else | |
| # echo "No websocket files to process; skipping." | |
| # fi | |
| read -r -a files <<<"$(printf '%s %s' "${{ env.rest_files }}" "${{ env.ws_files }}" | xargs)" | |
| if [ "${#files[@]}" -eq 0 ]; then | |
| echo "No files to process; skipping." | |
| exit 0 | |
| fi | |
| echo "Files to process: ${files[*]}" | |
| tsx utils/granular-go-build.ts "${files[@]}" | |
| # - name: Install dependencies | |
| # run: cd go && go get ./ccxt && cd .. | |
| - name: Build | |
| run: go build -C go ./v4 | |
| - name: Build Ws | |
| run: go build -C go ./v4/pro | |
| - name: Build tests | |
| run: go -C go build ./tests/main.go | |
| - name: Format go files | |
| run: go fmt . | |
| working-directory: go/v4 | |
| - name: Format go tests | |
| run: go fmt . | |
| working-directory: go/tests/base | |
| - name: Test GO Types | |
| if: env.important_modified == 'true' | |
| run: npm run test-types-go | |
| - name: Run Base Tests | |
| if: env.important_modified == 'true' | |
| run: npm run test-base-rest-go | |
| - name: Run Base Ws Tests | |
| if: env.important_modified == 'true' | |
| run: npm run test-base-ws-go | |
| - name: Run Id Tests | |
| if: env.important_modified == 'true' | |
| run: npm run id-tests-go | |
| - name: Request tests | |
| if: env.important_modified == 'true' | |
| run: npm run request-go | |
| - name: Request tests (specific) | |
| if: env.important_modified == 'false' | |
| run: | | |
| cleaned_rest_files=$(echo ${{ env.rest_files }} | tr -s ' ') | |
| for exchange in $cleaned_rest_files; do | |
| npm run request-go -- $exchange | |
| done | |
| - name: Response Tests | |
| if: env.important_modified == 'true' | |
| run: npm run response-go | |
| - name: Response tests (specific) | |
| if: env.important_modified == 'false' | |
| run: | | |
| cleaned_rest_files=$(echo ${{ env.rest_files }} | tr -s ' ') | |
| for exchange in $cleaned_rest_files; do | |
| npm run response-go -- $exchange | |
| done | |
| # - name: Upload Go Files | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: go-files | |
| # path: go/ | |
| - name: Upload Go Files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: go-files | |
| path: go/ | |
| - name: Upload shared_env.txt | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: shared_env | |
| path: shared_env.txt | |
| - name: Push GO changes to master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| rm -f ./go/tests/main | |
| rm -f ./go/v4/ccxt | |
| rm -f ./go/main | |
| git add go/ | |
| git commit -m "[Automated changes] GO files" || echo "No changes to commit." | |
| git remote set-url origin https://${GITHUB_TOKEN}@github.com/${{ github.repository }} | |
| git config --global pull.rebase false | |
| git pull --rebase --autostash origin master | |
| git push | |
| live-tests: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download shared_env | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: shared_env | |
| # - name: Download Go Files | |
| # uses: actions/download-artifact@v4 | |
| # with: | |
| # name: go-files | |
| # path: go/ | |
| # - uses: actions/checkout@v4 | |
| - name: Download Go Binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: go-files | |
| path: go/ | |
| - name: Restore shared_env | |
| run: ./utils/restore_shared_env.sh | |
| - name: Build tests | |
| run: go build -C go ./tests/main.go | |
| - name: Install npm dependencies | |
| run: npm ci --include=dev | |
| - name: Export exchanges | |
| run: npm run export-exchanges | |
| # - name: Install dependencies | |
| # run: go get ./go/v4 | |
| # - name: Build | |
| # run: go build ./go/v4 | |
| # - name: Build tests | |
| # run: go build ./go/tests/main.go | |
| # - name: Adjust permissions | |
| # run: cd go && chmod +x main | |
| - name: Build | |
| run: go build -C go ./v4 | |
| - name: Build tests | |
| run: go build -C go ./tests/main.go | |
| - name: Live tests | |
| if: env.important_modified == 'true' | |
| run: ./run-tests-simul.sh --go | |
| - name: Live tests (specific) | |
| if: env.important_modified == 'false' | |
| run: ./run-tests-simul.sh --go "${{ env.rest_files }}" "${{ env.ws_files }}" | |