Skip to content

fix/errores-despliegue-pedidos-unidad-prioridad (#267) #186

fix/errores-despliegue-pedidos-unidad-prioridad (#267)

fix/errores-despliegue-pedidos-unidad-prioridad (#267) #186

Workflow file for this run

name: Playwright
on:
push:
branches: [main, develop]
paths:
- 'frontend/src/**'
- 'frontend/e2e/**'
- 'frontend/playwright.config.*'
pull_request:
branches: [main, develop]
workflow_dispatch:
inputs:
grep:
description: 'Filter tests by tag or name (e.g. @auth, @tracking)'
required: false
default: ''
jobs:
e2e:
name: E2E tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '20'
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Install Playwright browsers
working-directory: frontend
run: npx playwright install --with-deps chromium
- name: Run tests
working-directory: frontend
env:
GREP: ${{ github.event.inputs.grep || '' }}
run: |
if [ -n "$GREP" ]; then
npx playwright test --grep "$GREP"
else
npx playwright test
fi
- name: Upload test report
uses: actions/upload-artifact@v7
if: failure()
with:
name: playwright-report
path: frontend/playwright-report/
retention-days: 7