Skip to content

🧪 Playwright Tests + Allure Report #24

🧪 Playwright Tests + Allure Report

🧪 Playwright Tests + Allure Report #24

Workflow file for this run

name: 🧪 Playwright Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:
jobs:
test-and-deploy:
timeout-minutes: 60
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: 📦 Install dependencies
run: npm ci
- name: 🎭 Install Playwright Browsers
run: npx playwright install --with-deps
- name: 🧪 Run Playwright tests
run: npm test
env:
BASE_URL: ${{ secrets.BASE_URL }}
API_TOKEN: ${{ secrets.API_TOKEN }}
- name: 📢 Send Slack notification
if: always() # se ejecuta aunque los tests fallen
run: node notify-slack.js
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: 🚀 Deploy to GitHub Pages
if: always()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./playwright-report
publish_branch: gh-pages