Skip to content

feat(provider-okx): add ton namespace support #5198

feat(provider-okx): add ton namespace support

feat(provider-okx): add ton namespace support #5198

Workflow file for this run

name: Check PR
on:
pull_request:
types: [opened, reopened, synchronize, labeled]
# Force Nx to accept and reuse computation caches restored from different CI runners
env:
NX_REJECT_UNKNOWN_LOCAL_CACHE: '0'
jobs:
check-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Full history is required so check-conventional-commits can run
# `git log origin/<base>..HEAD`.
fetch-depth: 0
- name: Prepare
uses: ./.github/actions/prepare
- name: Checking Conventional Commits
run: node ./scripts/check-conventional-commits/command.mjs
env:
REF: ${{ github.ref }}
build-libs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare
uses: ./.github/actions/prepare
# Cache Nx outputs (.nx/cache) and metadata (.nx/workspace-data) to optimize incremental builds
- name: Cache nx computation cache
uses: actions/cache@v4
with:
path: |
.nx/cache
.nx/workspace-data
key: ${{ runner.os }}-nx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-nx-
- name: Extract new translation keys and check if any error exists
run: node ./scripts/lingui/command.js extract --clean
- name: Compile new translation keys
run: yarn run i18n:compile
- name: Build Libs
run: node ./scripts/build-libs/command.mjs
- id: upload-artifacts
name: Upload Build Artifacts
uses: ./.github/actions/upload-build-artifacts
outputs:
hashed_branch: ${{ steps.upload-artifacts.outputs.hashed }}
run-tests:
runs-on: ubuntu-latest
needs: build-libs
steps:
- uses: actions/checkout@v4
- name: Download Build Information For Current Branch
uses: actions/download-artifact@v4
with:
name: ${{needs.build-libs.outputs.hashed_branch}}
- name: Prepare
uses: ./.github/actions/prepare
- name: Test
run: yarn run test
deploy:
runs-on: ubuntu-latest
needs: [build-libs, run-tests]
environment: preview
env:
REACT_APP_PLAYGROUND_RANGO_API_KEY: ${{ vars.PLAYGROUND_RANGO_API_KEY }}
REACT_APP_RANGO_API_KEY: ${{ vars.RANGO_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Prepare
uses: ./.github/actions/prepare
- name: Download Build Information For Current Branch
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: ${{needs.build-libs.outputs.hashed_branch}}
# Read-only restore of the Nx build state to skip rebuilding shared dependencies
- name: Restore nx computation cache
uses: actions/cache/restore@v4
with:
path: |
.nx/cache
.nx/workspace-data
key: ${{ runner.os }}-nx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-nx-
- name: Build & Deploy
uses: ./.github/actions/build-deploy
id: build-deploy
with:
PLAYGROUND_RANGO_API_KEY: ${{ vars.PLAYGROUND_RANGO_API_KEY }}
RANGO_API_KEY: ${{ vars.RANGO_API_KEY }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_WIDGET_CONFIG: ${{ secrets.VERCEL_PROJECT_WIDGET_CONFIG }}
VERCEL_PROJECT_WIDGET_APP: ${{ secrets.VERCEL_PROJECT_WIDGET_APP }}
VERCEL_PROJECT_Q: ${{ secrets.VERCEL_PROJECT_Q }}
ENABLE_PREVIEW_DEPLOY: true
outputs:
# the structure of output variable is {packageNameWithoutScope}-url like: widget-app-url
app_url: ${{ steps.build-deploy.outputs.app_url }}
playground_url: ${{ steps.build-deploy.outputs.playground_url }}
# add job for each project that you want has preview deployment
app-preview:
runs-on: ubuntu-latest
needs: deploy
environment:
name: app-preview
url: ${{ steps.seturl.outputs.url }}
steps:
- name: Extract Preview URL
id: seturl
run: |
echo "url=${{ needs.deploy.outputs.app_url }}">> $GITHUB_OUTPUT
echo "Preview URL: ${{ needs.deploy.outputs.app_url}}"
playground-preview:
runs-on: ubuntu-latest
needs: deploy
environment:
name: playground-preview
url: ${{ steps.seturl.outputs.url }}
steps:
- name: Extract Preview URL
id: seturl
run: |
echo "url=${{ needs.deploy.outputs.playground_url }}">> $GITHUB_OUTPUT
echo "Preview URL: ${{ needs.deploy.outputs.playground_url}}"
analyze-bundle:
needs: [build-libs, run-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Prepare
uses: ./.github/actions/prepare
- name: Download Build Information For Current Branch
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: ${{needs.build-libs.outputs.hashed_branch}}
- name: Hash Target Branch Name
id: hash_target_branch_name
run: |
hashed_name=$(printf "%s" "${{ github.base_ref }}" | base64 -w 0)
echo "hashed=${hashed_name}">> $GITHUB_OUTPUT
- name: Analyze Bundles And Create Report
run: node ./scripts/analyze-bundle/command.mjs --currentBranchDirectory current-branch --targetBranchDirectory target-branch --targetBranchArtifactName ${{steps.hash_target_branch_name.outputs.hashed}}
env:
GH_TOKEN: ${{ github.token }}
GH_REPOSITORY: ${{ github.repository }}
build-examples:
runs-on: ubuntu-latest
needs: build-libs
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Prepare
uses: ./.github/actions/prepare
- name: Download Build Information For Current Branch
uses: actions/download-artifact@v4
with:
name: ${{needs.build-libs.outputs.hashed_branch}}
- name: Build examples
uses: ./.github/actions/build-examples