skip to Main Content

I would like to run automated Playwright tests with Github Actions. I created a cronjob for this, but it has no effect. What else should I consider? Here is the content of my .github/workflows/playwright.yml:

name: Playwright Tests
on:
  push:
    branches: [ main, master ]
  pull_request:
    branches: [ main, master ]
  schedule:
    - cron: '12 14 * * Mon-Fri'
jobs:
  test:
    timeout-minutes: 60
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v2
      with:
        node-version: '14.x'
    - name: Install dependencies
      run: npm ci
    - name: Install Playwright Browsers
      run: npx playwright install --with-deps
    - name: Run Playwright tests
      run: npx playwright test
    - uses: actions/upload-artifact@v2
      if: always()
      with:
        name: playwright-report
        path: playwright-report/
        retention-days: 30

2

Answers


  1. Chosen as BEST ANSWER

    The run came 2 hours late. Patience is required here.


  2. In the future, if you have to create cron jobs, I can recommend crontab.guru. Its UI is simple to create effective cron schedules.

    Crontab guru screenshot

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search