Bump docker/setup-buildx-action from 3.8.0 to 3.10.0 #29
This file contains 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: Test Electron App | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [20] | |
services: | |
xvfb: | |
image: mcr.microsoft.com/playwright:focal | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 | |
- name: Build packages | |
uses: ./.github/actions/build | |
with: | |
packages-only: true | |
node-version: ${{ matrix.node-version }} | |
# Caching browser binaries is not recommended, since the amount of time it takes to restore the cache is comparable to the time it takes to download the binaries. | |
- name: Install chromium browser | |
run: npx playwright install chromium | |
- name: Install Playwright dependencies | |
run: npx playwright install-deps | |
- name: Check whether appFiles are there | |
run: ls -R ./packages/scalar-app/dist | |
- name: Start Xvfb | |
run: | | |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | |
echo "DISPLAY=:99" >> $GITHUB_ENV | |
- name: Run e2e tests | |
run: CI=1 DEBUG=pw:browser* pnpm test:e2e:electron | |
env: | |
DISPLAY: ':99' | |
- if: failure() | |
name: Show stack traces and debug info | |
working-directory: playwright | |
run: | | |
echo "=== Playwright Logs ===" | |
cat ~/.cache/ms-playwright/browser_logs/*.log || true | |
echo "=== Test Results ===" | |
ls -la test-results/ || true | |
echo "=== Trace Information ===" | |
for trace_file in test-results/*/trace.zip; do | |
if [ -f "$trace_file" ]; then | |
echo -e "\nAttempting to show trace: $trace_file" | |
timeout 30 pnpm exec playwright show-trace "$trace_file" || echo "Trace viewing timed out" | |
fi | |
done |