Skip to content

e2e web

e2e web #232

Workflow file for this run

name: e2e web
on:
workflow_run:
workflows: ["Basic build and tests"]
types:
- completed
branches:
- main
# Allows manual workflow runs with branch selection in UI
workflow_dispatch: {}
jobs:
base:
name: e2e web
runs-on: ubuntu-latest
# runs-on: [self-hosted, k8s, linux]
# container:
# image: node:22
# options: --user root
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run != '' && github.event.workflow_run.conclusion == 'success') }}
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NVMRC }}'
cache: 'pnpm'
- name: Get Playwright version
id: playwright-version
run: echo "version=$(pnpm list @playwright/test --json | jq -r '.[0].devDependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT
- name: Cache Playwright browsers
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Setup dependencies
run: |
if [ "$(id -u)" -ne 0 ]; then
sudo apt-get update && sudo apt-get install --no-install-recommends -y xvfb xauth
else
apt-get update && apt-get install --no-install-recommends -y xvfb xauth
fi
pnpm install --frozen-lockfile
pnpm --filter demo-wallet e2e:deps
# - name: Start TON Connect Bridge
# run: |
# echo "Starting TON Connect Bridge service with docker-compose.memory.yml..."
# docker compose -f docker-compose.bridge.yml up -d
# echo "Waiting for services to be ready..."
# sleep 2
# echo "Checking if TON Connect Bridge service is accessible..."
# max_attempts=30
# attempt=1
# while [ $attempt -le $max_attempts ]; do
# echo "Attempt $attempt/$max_attempts: Checking http://localhost:8081/bridge"
# if curl -I -f -s -o /dev/null -w "%{http_code}\n" http://localhost:9103/metrics; then
# echo "✅ TON Connect Bridge service is accessible at http://localhost:8081/bridge"
# break
# else
# echo "❌ TON Connect Bridge service not ready yet, waiting 5 seconds..."
# sleep 2
# attempt=$((attempt + 1))
# fi
# done
# if [ $attempt -gt $max_attempts ]; then
# echo "❌ TON Connect Bridge service failed to start within expected time"
# echo "Docker containers status:"
# docker compose -f docker-compose.bridge.yml ps
# echo "TON Connect Bridge container logs:"
# docker compose -f docker-compose.bridge.yml logs bridge
# exit 1
# fi
# echo "🚀 TON Connect Bridge service is now running and accessible at http://localhost:8081/bridge"
- name: Run web e2e specs
run: |
pnpm build
cd apps/demo-wallet
xvfb-run pnpm e2e
env:
WALLET_MNEMONIC: ${{ secrets.WALLET_MNEMONIC }}
# VITE_BRIDGE_URL: 'http://localhost:8081/bridge'
VITE_BRIDGE_URL: 'https://connect.ton.org/bridge'
ALLURE_BASE_URL: ${{ secrets.ALLURE_BASE_URL }}
ALLURE_API_TOKEN: ${{ secrets.ALLURE_API_TOKEN_CI }}
ALLURE_PROJECT_ID: ${{ secrets.ALLURE_PROJECT_ID }}
VITE_DISABLE_AUTO_POPUP: true
VITE_DISABLE_NETWORK_SEND: true
- name: Upload Allure Results
if: always()
uses: actions/upload-artifact@v4
with:
name: allure-results-web
path: apps/demo-wallet/allure-results/
retention-days: 1
- name: Upload Playwright Report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-web
path: apps/demo-wallet/test-results/
retention-days: 1