fix double ctx bug #1478
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: CI | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| env: | |
| WSS_URL: ws://127.0.0.1:9955 | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| MOONBEAM_VERSION: latest | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - run: pnpm install | |
| - run: pnpm run build | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - run: pnpm install | |
| - run: pnpm run lint | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - run: pnpm install | |
| - run: pnpm run fmt | |
| test_init: | |
| runs-on: ubuntu-latest | |
| needs: ["build"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - name: Build like before | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - name: Initialize config | |
| run: | | |
| cd test | |
| rm moonwall.config.json | |
| pnpm moonwall init --acceptAllDefaults | |
| - name: Run test | |
| run: | | |
| cd test | |
| pnpm moonwall test default_env | |
| test_basic: | |
| runs-on: ubuntu-latest | |
| needs: ["build"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Build like before | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - name: Run standard dev test | |
| run: | | |
| cd test | |
| bun moonwall test basic | |
| test_tanssi: | |
| runs-on: ubuntu-latest | |
| needs: ["build"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - name: Build like before | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Cache tanssi binary | |
| id: tanssi-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: test/tmp/tanssi-node | |
| key: tanssi-node-latest-${{ runner.os }} | |
| - name: Download tanssi binary | |
| if: steps.tanssi-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd test | |
| bun moonwall download tanssi-node latest ./tmp | |
| - name: Run standard dev test | |
| run: | | |
| cd test | |
| bun moonwall test dev_tanssi | |
| test_sharded: | |
| runs-on: ubuntu-latest | |
| needs: ["build"] | |
| env: | |
| NODE_OPTIONS: "--no-deprecation" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| suite: ["dev_test", "dev_multi", "dev_seq"] | |
| shard: [1, 2] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - name: Build like before | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Cache moonbeam binary | |
| id: moonbeam-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: test/tmp | |
| key: moonbeam-${{ env.MOONBEAM_VERSION }}-${{ runner.os }} | |
| - name: Download moonbeam binary | |
| if: steps.moonbeam-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd test | |
| bun moonwall download moonbeam $MOONBEAM_VERSION ./tmp | |
| - name: Run ${{matrix.suite}} dev test | |
| run: | | |
| cd test | |
| bun papi generate | |
| bun moonwall test ${{matrix.suite}} --ts ${{ matrix.shard }}/2 | |
| test_single: | |
| runs-on: ubuntu-latest | |
| needs: ["build"] | |
| env: | |
| NODE_OPTIONS: "--no-deprecation" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| suite: ["papi_dev", "fork_test", "dev_docker", "dev_smoke"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - name: Build like before | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Cache moonbeam binary | |
| id: moonbeam-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: test/tmp | |
| key: moonbeam-${{ env.MOONBEAM_VERSION }}-${{ runner.os }} | |
| - name: Download moonbeam binary | |
| if: steps.moonbeam-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd test | |
| bun moonwall download moonbeam $MOONBEAM_VERSION ./tmp | |
| - name: Run ${{matrix.suite}} dev test | |
| run: | | |
| cd test | |
| bun papi generate | |
| bun moonwall test ${{matrix.suite}} | |
| test_update: | |
| runs-on: ubuntu-latest | |
| needs: ["build"] | |
| env: | |
| NO_COLOR: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - name: Build like before | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Run snapshot update test | |
| id: update_test | |
| run: | | |
| cd test | |
| bun moonwall test update_snapshot -u > snapshot_output.txt 2>&1 | |
| - name: Check if files were modified in the 2 minutes | |
| run: | | |
| cd test | |
| find suites/update/__snapshots__/test_basic.ts.snap suites/update/timbo.txt | |
| find suites/update/__snapshots__/test_basic.ts.snap suites/update/timbo.txt -mmin -2 | wc -l | grep -q "2" | |
| - name: Check console output for snapshot updates | |
| run: | | |
| cd test | |
| cat snapshot_output.txt | |
| grep "Snapshots 3 updated" snapshot_output.txt | |
| test_chopsticks: | |
| runs-on: ubuntu-latest | |
| needs: ["build"] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| POLKADOT_ASSET_HUB_ENDPOINT: ${{ secrets.POLKADOT_ASSET_HUB_ENDPOINT}} | |
| MOONBEAM_ENDPOINT: ${{ secrets.MOONBEAM_ENDPOINT}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| suite: ["chopsticks", "multi_chopsticks", "chopsticks_round"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - name: Build like before | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Run ${{matrix.suite}} | |
| run: | | |
| cd test | |
| bun moonwall test ${{matrix.suite}} | |
| # disabled until we have an available instance of moonscope running | |
| # - name: Use Send Report Action | |
| # if: always() | |
| # uses: ./.github/send-report-action | |
| # with: | |
| # table: dev_reports | |
| # moonwallenv: moonwall_chopsticks | |
| # report_file_path: tmp/testReports.json | |
| # moonscope: "https://moonscope.boo:3345" | |
| test_readonly: | |
| runs-on: ubuntu-latest | |
| needs: ["build"] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| suite: ["eth_test", "viem_test", "papi_readonly"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - name: Build like before | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Run standard ${{matrix.suite}} | |
| run: | | |
| cd test | |
| bun papi add dot -n polkadot | |
| bun moonwall test ${{matrix.suite}} | |
| # disabled until web3.js fix their stuff | |
| # - name: Run standard web3 run | |
| # run: bun moonwall test web3_test | |
| test_effect: | |
| runs-on: ubuntu-latest | |
| needs: ["build"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - name: Build like before | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - name: Run Effect-TS tests | |
| run: cd packages/cli && pnpm test | |
| test_zombie: | |
| runs-on: ubuntu-latest | |
| needs: ["build"] | |
| env: | |
| MOONBEAM_VERSION: "0.43" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| suite: ["zombie_test", "zombie_multi_para", "zombie_noPara"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.1.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| cache: "pnpm" | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Cache moonbeam binary | |
| id: moonbeam-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: test/tmp | |
| key: moonbeam-${{ env.MOONBEAM_VERSION }}-${{ runner.os }} | |
| - name: Build like before | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - name: Download moonbeam binary | |
| if: steps.moonbeam-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd test | |
| bun moonwall download moonbeam $MOONBEAM_VERSION ./tmp | |
| - name: Cache polkadot binaries | |
| id: polkadot-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| test/tmp/polkadot | |
| test/tmp/polkadot-execute-worker | |
| test/tmp/polkadot-prepare-worker | |
| key: polkadot-stable2503-7-${{ runner.os }} | |
| - name: Download polkadot binaries | |
| if: steps.polkadot-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd test | |
| bun moonwall download polkadot stable2503-7 ./tmp | |
| bun moonwall download polkadot-execute-worker stable2503-7 ./tmp | |
| bun moonwall download polkadot-prepare-worker stable2503-7 ./tmp | |
| - name: Run ${{matrix.suite}} | |
| run: | | |
| cd test | |
| bun moonwall test ${{matrix.suite}} |