Playwright testing #37
Workflow file for this run
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: Playwright Tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18.x' # Cambia esto a la versión de Node.js que usas | |
- name: Build and start services | |
run: | | |
docker-compose up -d --build | |
- name: Wait for services to be ready | |
run: | | |
while ! nc -z localhost 5000; do sleep 10; done | |
while ! nc -z localhost 4000; do sleep 10; done | |
- name: Run Playwright tests | |
run: | | |
npm ci | |
npx playwright install | |
npx playwright test --project webkit-dev | |
- uses: actions/upload-artifact@v2 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
- name: Stop services | |
run: | | |
docker-compose down |