diff --git a/.github/workflows/_e2e.yml b/.github/workflows/_e2e.yml index f339e58018..2b7a4d9746 100644 --- a/.github/workflows/_e2e.yml +++ b/.github/workflows/_e2e.yml @@ -55,6 +55,10 @@ on: description: Names Display type: boolean default: false + isNamesSDK: + description: Names SDK + type: boolean + default: false workflow_call: inputs: isNightly: @@ -96,6 +100,9 @@ on: isNamesDisplay: type: boolean required: true + isNamesSDK: + type: boolean + required: true secrets: EVM_BRIDGE_PREVIEW_DEFAULT_NETWORK: required: true @@ -115,7 +122,7 @@ env: jobs: localnet: name: Localnet - if: inputs.isNightly || inputs.isRpc || inputs.isExplorer || inputs.isAppsBackend || inputs.isTypescriptSDK || inputs.isWallet || inputs.isGraphQlTransport || inputs.isWalletDashboard || inputs.isEvmBridge || inputs.isIscSDK || inputs.isNamesDapp || inputs.isNamesDisplay + if: inputs.isNightly || inputs.isRpc || inputs.isExplorer || inputs.isAppsBackend || inputs.isTypescriptSDK || inputs.isWallet || inputs.isGraphQlTransport || inputs.isWalletDashboard || inputs.isEvmBridge || inputs.isIscSDK || inputs.isNamesDapp || inputs.isNamesDisplay || inputs.isNamesSDK runs-on: self-hosted-x64 services: postgres: @@ -157,6 +164,7 @@ jobs: echo "runTsSdk=${{ inputs.isNightly || inputs.isTypescriptSDK || inputs.isRpc }}" >> $GITHUB_OUTPUT echo "runNamesDapp=${{ inputs.isNightly || inputs.isNamesDapp }}" >> $GITHUB_OUTPUT echo "runNamesDisplay=${{ inputs.isNightly || inputs.isNamesDisplay }}" >> $GITHUB_OUTPUT + echo "runNamesSDK=${{ inputs.isNightly || inputs.isNamesSDK || inputs.isNamesDapp }}" >> $GITHUB_OUTPUT - name: Download IOTA Binary run: | @@ -374,9 +382,9 @@ jobs: # ─── Names Dapp ────────────────────────────────────────────────────────── - - name: Setup E2E Network for Names Dapp + - name: Setup E2E Network for Names id: setup-names-network - if: (!cancelled() && !failure()) && steps.conditions.outputs.runNamesDapp == 'true' + if: (!cancelled() && !failure()) && (steps.conditions.outputs.runNamesDapp == 'true' || steps.conditions.outputs.runNamesSDK == 'true') continue-on-error: ${{ inputs.isNightly }} env: DB_URL: "postgres://postgres:postgrespw@localhost:5432/iota_indexer" @@ -458,6 +466,24 @@ jobs: pnpm --filter names-display run build pnpm --filter names-display run test + # ─── Names SDK ───────────────────────────────────────────────────────── + + - name: Build Names SDK + id: build-names-sdk + if: (!cancelled() && !failure()) && steps.conditions.outputs.runNamesSDK == 'true' + continue-on-error: ${{ inputs.isNightly }} + run: pnpm names-sdk build + + - name: Prepare local network & run Names SDK e2e tests + id: run-names-sdk + if: (!cancelled() && !failure()) && steps.build-names-sdk.outcome == 'success' && steps.conditions.outputs.runNamesSDK == 'true' + continue-on-error: ${{ inputs.isNightly }} + env: + IS_CI_JOB: true + NETWORK: localnet + run: | + VITE_IOTA_BIN="iota" pnpm --filter=@iota/iota-names-sdk test:e2e + # ─── Nightly failure report ─────────────────────────────────────────────── - name: Fail job if any nightly test group failed @@ -474,6 +500,7 @@ jobs: [[ "${{ steps.run-evm-bridge.outcome }}" == 'failure' ]] && failed+=('EVM Bridge') [[ "${{ steps.run-names-dapp.outcome }}" == 'failure' ]] && failed+=('Names Dapp') [[ "${{ steps.run-names-display.outcome }}" == 'failure' ]] && failed+=('Names Display') + [[ "${{ steps.run-names-sdk.outcome }}" == 'failure' ]] && failed+=('Names SDK') if [[ ${#failed[@]} -gt 0 ]]; then echo "Failed test groups: ${failed[*]}" diff --git a/.github/workflows/turbo_hierarchy.yml b/.github/workflows/turbo_hierarchy.yml index f28b14112d..cbcbc77ace 100644 --- a/.github/workflows/turbo_hierarchy.yml +++ b/.github/workflows/turbo_hierarchy.yml @@ -166,64 +166,6 @@ jobs: env: GH_TOKEN: ${{ github.token }} - names-sdk-test: - name: Names SDK Tests - needs: [diff, build] - if: (!cancelled() && !failure() && (needs.diff.outputs.isNamesSDK == 'true' || needs.diff.outputs.isNamesDapp == 'true') && (github.ref_name == 'develop' || github.event.pull_request.draft == false || contains(github.event.pull_request.body, '[run-ci]'))) - runs-on: ubuntu-latest - services: - postgres: - image: postgres:15 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgrespw - POSTGRES_DB: iota_indexer - POSTGRES_HOST_AUTH_METHOD: trust - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 - steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - with: - fetch-depth: 1 - submodules: true - - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 - - name: Install Nodejs - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: "24" - cache: "pnpm" - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Download IOTA Binary - run: .github/scripts/download-iota-binary.sh - - name: Build SDK - run: pnpm names-sdk build - - name: Prepare local network & run SDK tests - env: - IS_CI_JOB: true - NETWORK: localnet - run: | - iota-localnet start --with-faucet --faucet-amount 100000000000000 --with-indexer --with-graphql --force-regenesis --epoch-duration-ms 120000 > /dev/null 2>&1 & - sleep 10 - iota client --yes new-env --alias localnet --rpc http://127.0.0.1:9000 --graphql http://127.0.0.1:9125 - iota client switch --env localnet - iota client faucet - sleep 5 - cd external/names/scripts - pnpm install - export NETWORK=localnet - pnpm ts-node init/init.ts localnet - pnpm ts-node tests/register-name.ts - sleep 5 - cat ./package-info/localnet.json - cd ../../../sdk/names - VITE_IOTA_BIN="iota" pnpm test:e2e - e2e: if: (!cancelled() && !failure() && (github.ref_name == 'develop' || github.event.pull_request.draft == false || contains(github.event.pull_request.body, '[run-ci]'))) needs: diff @@ -242,6 +184,7 @@ jobs: isKiosk: ${{ needs.diff.outputs.isKiosk == 'true' }} isNamesDapp: ${{ needs.diff.outputs.isNamesDapp == 'true' }} isNamesDisplay: ${{ needs.diff.outputs.isNamesDisplay == 'true' }} + isNamesSDK: ${{ needs.diff.outputs.isNamesSDK == 'true' }} secrets: EVM_BRIDGE_PREVIEW_DEFAULT_NETWORK: ${{ secrets.EVM_BRIDGE_PREVIEW_DEFAULT_NETWORK }} EVM_BRIDGE_CONFIG: ${{ secrets.EVM_BRIDGE_CONFIG }} diff --git a/.github/workflows/turbo_nightly.yml b/.github/workflows/turbo_nightly.yml index 26f60a0772..503c7fe39f 100644 --- a/.github/workflows/turbo_nightly.yml +++ b/.github/workflows/turbo_nightly.yml @@ -36,6 +36,7 @@ jobs: isKiosk: true isNamesDapp: true isNamesDisplay: true + isNamesSDK: true secrets: EVM_BRIDGE_PREVIEW_DEFAULT_NETWORK: ${{ secrets.EVM_BRIDGE_PREVIEW_DEFAULT_NETWORK }} EVM_BRIDGE_CONFIG: ${{ secrets.EVM_BRIDGE_CONFIG }}