Skip to content

Commit 790d0d2

Browse files
committed
e2e: ci tests
1 parent b290fa2 commit 790d0d2

File tree

1 file changed

+15
-24
lines changed

1 file changed

+15
-24
lines changed

.github/workflows/test-wallet-playwright.yaml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Wallet Tests (Playwright Action)
1+
name: Wallet Tests (Container)
22

33
on:
44
workflow_dispatch:
@@ -11,13 +11,15 @@ env:
1111
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
1212

1313
jobs:
14-
wallets-playwright-action:
15-
name: wallets (Using Playwright Action)
14+
wallets-container:
15+
name: wallets (container)
1616
timeout-minutes: 20
1717
runs-on: ubuntu-latest
18+
container:
19+
image: mcr.microsoft.com/playwright:v1.50.1-jammy
1820
steps:
1921
- uses: actions/checkout@v4
20-
22+
2123
- name: Setup pnpm
2224
uses: pnpm/action-setup@v4
2325
with:
@@ -34,29 +36,20 @@ jobs:
3436

3537
- name: Install system dependencies
3638
run: |
37-
sudo apt-get update
38-
sudo apt-get install -y parallel xvfb
39-
40-
- name: Install Playwright browsers with dependencies
41-
run: pnpm exec playwright install --with-deps chromium
42-
43-
- name: Setup virtual display
44-
run: |
45-
export DISPLAY=:99
46-
Xvfb :99 -screen 0 1920x1080x24 > /dev/null 2>&1 &
47-
echo "DISPLAY=:99" >> $GITHUB_ENV
39+
apt-get update
40+
apt-get install -y parallel
4841
4942
- name: Verify Playwright installation
5043
run: |
5144
echo "Checking Playwright installation..."
5245
pnpm exec playwright --version
53-
46+
5447
echo "Checking browser installations..."
5548
pnpm exec playwright show-report || true
56-
49+
5750
echo "Cache contents:"
5851
ls -la ~/.cache/ms-playwright/ || echo "No cache found"
59-
52+
6053
# Test that we can actually launch chromium
6154
echo "Testing chromium launch..."
6255
cat > test-launch.js << 'EOF'
@@ -75,14 +68,12 @@ jobs:
7568
node test-launch.js
7669
7770
- name: Run wallet tests
71+
env:
72+
SECRET_WORDS: ${{ secrets.SECRET_WORDS }}
7873
run: |
79-
parallel --lb --halt now,success=1,fail=1 ::: \
74+
xvfb-run --auto-servernum parallel --lb --halt now,success=1,fail=1 ::: \
8075
"pnpm dev" \
8176
"pnpm wait-on http://localhost:3000 && pnpm e2e:wallet --headed"
82-
env:
83-
SECRET_WORDS: ${{ secrets.SECRET_WORDS }}
84-
DISPLAY: :99
85-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "0"
8677
8778
- uses: actions/upload-artifact@v4
8879
if: always()
@@ -92,4 +83,4 @@ jobs:
9283
playwright-report/
9384
test-results/
9485
*.png
95-
retention-days: 30
86+
retention-days: 30

0 commit comments

Comments
 (0)