Skip to content

Commit

Permalink
Adding new ymls
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalo-diamend committed Jul 4, 2024
1 parent 3d0ee01 commit 457d0b7
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 22 deletions.
25 changes: 3 additions & 22 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
name: Playwright Tests
name: Playwright Tests (Push and Schedule)

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
schedule:
- cron: "0 10 * * 1-5" # Ejecutar a las 10 AM de lunes a viernes
workflow_dispatch:
inputs:
fileType:
description: 'Select tests to run'
required: true
default: 'all'
type: choice
options:
- all
- about
- careers
- home
- services
- work
- cron: "0 13 * * 1-5"

jobs:
test:
Expand All @@ -36,12 +22,7 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: |
if [ "${{ github.event.inputs.fileType }}" == "all" ]; then
npx playwright test --project=chromium
else
npx playwright test "src/tests/${{ github.event.inputs.fileType }}.spec.js" --project=chromium
fi
run: npx playwright test --project=chromium
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/workflow-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Playwright Tests (Dispatch)

on:
workflow_dispatch:
inputs:
fileType:
description: 'Select tests to run'
required: true
default: 'all'
type: choice
options:
- all
- about
- careers
- home
- services
- work

jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: |
if [ "${{ github.event.inputs.fileType }}" == "all" ]; then
npx playwright test --project=chromium
else
npx playwright test src/tests/${{ github.event.inputs.fileType }}.spec.js --project=chromium
fi
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/

0 comments on commit 457d0b7

Please sign in to comment.