Skip to content

fix: DevServer reconnecting when timeout #6238

fix: DevServer reconnecting when timeout

fix: DevServer reconnecting when timeout #6238

Workflow file for this run

name: Devtools
on:
pull_request:
branches: [main]
push:
branches: [main]
env:
PLAYWRIGHT_BROWSERS_PATH: 0
jobs:
main:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Pnpm
run: |
corepack prepare pnpm@8.11.0 --activate
corepack enable
- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'
- name: Cache Browsers
uses: actions/cache@v3
id: browsers-cache
with:
path: |
~/.cache/ms-playwright
~/.cache/Cypress
key: ${{ runner.os }}-browsers-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Set Playwright cache status
run: echo "PLAYWRIGHT_CACHE_HIT=${{ steps.browsers-cache.outputs.cache-hit }}" >> $GITHUB_ENV
- name: Set Nx SHA
uses: nrwl/nx-set-shas@v3
- name: Install Dependencies
run: pnpm install && find . -maxdepth 6 -type d \( -name ".cache" -o -name ".modern-js" \) -exec rm -rf {} +
- name: Install Cypress
run: npx cypress install
- name: Run Affected Build
run: npx nx run-many --targets=build --projects=tag:type:pkg
- name: Configuration xvfb
shell: bash
run: sudo apt-get update && sudo apt-get install xvfb
- name: E2E Chrome Devtools Dev
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
command: |
npx kill-port 3009 3010 3011 3012 3013 4001 &&
pnpm run app:manifest:dev & echo "done" && \
npx wait-on tcp:3009 tcp:3010 tcp:3011 tcp:3012 tcp:3013 && \
sleep 10 &&
npx nx e2e:devtools chrome-devtools
- name: E2E Chrome Devtools Prod
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
command: |
npx kill-port 3009 3010 3011 3012 3013 4001 &&
npx kill-port 3009 3010 3011 3012 3013 4001 &&
pnpm run app:manifest:prod & echo "done" && \
npx wait-on tcp:3009 tcp:3010 tcp:3011 tcp:3012 tcp:3013 && \
sleep 30 &&
npx nx e2e:devtools chrome-devtools
- name: kill port
run: npx kill-port 3013 3009 3010 3011 3012 4001; exit 0
- name: Kill All Node Processes
run: pkill -f node || true