Skip to content

feat: Add contract support for stream escrow release conditions #391

feat: Add contract support for stream escrow release conditions

feat: Add contract support for stream escrow release conditions #391

Workflow file for this run

name: Playwright E2E
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
playwright-e2e:
name: Playwright E2E tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install frontend dependencies
working-directory: frontend
run: npm ci
- name: Install Playwright Chromium browser
working-directory: frontend
run: npx playwright install chromium
- name: Create backend env file for CI
run: |
cat > backend/.env <<'EOF'
PORT=3001
SOROBAN_DISABLED=true
ALLOWED_ASSETS=USDC,XLM
EOF
- name: Start Docker Compose stack
run: |
docker compose -f docker-compose.yml down --volumes --remove-orphans || true
docker compose -f docker-compose.yml up -d --build
- name: Wait for backend health and frontend readiness
run: |
for i in $(seq 1 30); do
if curl --silent --fail http://localhost:3001/api/health >/dev/null && curl --silent --fail http://localhost:3000 >/dev/null; then
echo "Stack is ready";
exit 0;
fi;
echo "Waiting for services to become ready... ($i/30)";
sleep 5;
done;
echo "Services did not become ready in time.";
docker compose -f docker-compose.yml ps;
docker compose -f docker-compose.yml logs --no-color --tail=100;
exit 1
- name: Run Playwright tests
id: playwright-tests
working-directory: frontend
run: npm run test:e2e
continue-on-error: true
- name: Upload Playwright HTML report on failure
if: always() && steps.playwright-tests.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: frontend/playwright-report
- name: Fail workflow if Playwright failed
if: always() && steps.playwright-tests.outcome != 'success'
run: |
echo "Playwright E2E tests failed."
exit 1
- name: Tear down Docker Compose stack
if: always()
run: docker compose -f docker-compose.yml down --volumes --remove-orphans