chore: add sponsored passkey send test #1444
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| e2e-demo-app-erc4337: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| defaults: | |
| run: | |
| working-directory: ./ | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.11.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | |
| with: | |
| node-version: lts/Iron | |
| cache: pnpm | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| targets: wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| # Install standard foundry (for Anvil and regular EVM deployments) | |
| - name: Install foundry | |
| uses: foundry-rs/foundry-toolchain@v1.5.0 | |
| # Start Anvil for ERC-4337 contract deployments (standard EVM on port 8545) | |
| # Uses same configuration as local development: fork mainnet, chain-id 1337 | |
| - name: Start Anvil | |
| run: | | |
| pnpm run anvil & | |
| echo "Waiting for Anvil to be ready..." | |
| timeout 30 bash -c 'until cast client --rpc-url http://localhost:8545 > /dev/null 2>&1; do sleep 1; done' | |
| echo "Anvil is ready!" | |
| working-directory: packages/erc4337-contracts | |
| # Install dependencies for repo | |
| - name: Install dependencies | |
| run: pnpm install -r --frozen-lockfile | |
| # Web SDK depends on ERC-4337 contracts for WASM build | |
| - name: Install ERC-4337 contract dependencies | |
| run: forge soldeer install | |
| working-directory: packages/erc4337-contracts | |
| - name: Build ERC-4337 contracts | |
| run: forge build | |
| working-directory: packages/erc4337-contracts | |
| - name: Build ERC-4337 related packages | |
| run: | | |
| pnpm nx build web-sdk | |
| pnpm nx build sdk-4337 | |
| pnpm nx build:erc4337 demo-app | |
| - name: Deploy Demo-App ERC-4337 contracts | |
| continue-on-error: true | |
| run: pnpm nx deploy-msa-factory demo-app | |
| # Start Alto bundler with CORS proxy (same as local development) | |
| # Alto runs on port 4338, CORS proxy on port 4337 | |
| - name: Start Alto bundler with CORS proxy | |
| run: | | |
| pnpm run bundler:with-proxy & | |
| BUNDLER_PID=$! | |
| echo "BUNDLER_PID=$BUNDLER_PID" >> $GITHUB_ENV | |
| echo "Waiting for bundler to be ready on port 4337..." | |
| timeout 60 bash -c 'until curl -s http://localhost:4337 > /dev/null 2>&1; do sleep 1; done' | |
| echo "Bundler is ready!" | |
| working-directory: packages/erc4337-contracts | |
| - name: Run tests | |
| run: pnpm test | |
| working-directory: packages/sdk-platforms/web | |
| # Run E2E tests | |
| - name: Install Playwright Chromium Browser | |
| run: pnpm exec playwright install chromium | |
| working-directory: examples/demo-app | |
| - name: Run ERC4337 e2e tests | |
| run: pnpm nx e2e:erc4337 demo-app | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: demo-app-4337-playwright-report | |
| path: examples/demo-app/playwright-report/ | |
| retention-days: 3 | |
| - name: Run demo-only e2e tests (session + passkey) | |
| run: pnpm nx e2e:demo-only demo-app | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: demo-app-demo-only-playwright-report | |
| path: examples/demo-app/playwright-report/ | |
| retention-days: 3 | |
| # Run Guardian E2E tests (reuses same Anvil + bundler setup) | |
| - name: Install Playwright Chromium Browser for Guardian tests | |
| run: pnpm exec playwright install chromium | |
| working-directory: packages/auth-server | |
| - name: Run Guardian e2e tests | |
| run: pnpm nx e2e:guardian auth-server | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: auth-server-guardian-playwright-report | |
| path: packages/auth-server/playwright-report/ | |
| retention-days: 3 | |
| # e2e-nft-quest: | |
| # runs-on: ubuntu-latest | |
| # defaults: | |
| # run: | |
| # working-directory: ./ | |
| # steps: | |
| # - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| # with: | |
| # submodules: recursive | |
| # # Start node | |
| # - name: Era Test Node Action | |
| # uses: dutterbutter/era-test-node-action@36ffd2eefd46dc16e7e2a8e1715124400ec0a3ba # v1 | |
| # - name: Setup pnpm | |
| # uses: pnpm/action-setup@v4 | |
| # with: | |
| # version: 9.11.0 | |
| # - name: Use Node.js | |
| # uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | |
| # with: | |
| # node-version: lts/Iron | |
| # cache: pnpm | |
| # # Install dependencies for repo | |
| # - name: Install dependencies | |
| # run: pnpm install -r --frozen-lockfile | |
| # # Install dependencies for the submodule | |
| # - name: Install contract dependencies | |
| # run: pnpm install -r --frozen-lockfile | |
| # working-directory: packages/contracts | |
| # - name: Build contracts | |
| # run: pnpm build | |
| # working-directory: packages/contracts | |
| # - name: Deploy contracts | |
| # run: pnpm run deploy --file ../auth-server/stores/local-node.json | |
| # working-directory: packages/contracts | |
| # - name: Build SDK | |
| # run: pnpm nx build sdk | |
| # - name: Deploy NFT contracts | |
| # run: pnpm nx deploy:local nft-quest-contracts | |
| # # Run E2E tests | |
| # - name: Install Playwright Chromium Browser | |
| # run: pnpm exec playwright install chromium | |
| # working-directory: examples/nft-quest | |
| # - name: Run e2e tests | |
| # run: pnpm nx e2e nft-quest | |
| # - uses: actions/upload-artifact@v4 | |
| # if: ${{ !cancelled() }} | |
| # with: | |
| # name: nft-quest-playwright-report | |
| # path: examples/nft-quest/playwright-report/ | |
| # retention-days: 3 |