Scheduled Playwright Tests #84
This file contains hidden or 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: Scheduled Playwright Tests | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # Runs daily at midnight | |
| defaults: | |
| run: | |
| working-directory: ./ | |
| permissions: | |
| contents: read # for checkout repository | |
| issues: write # for GitHub Notification | |
| jobs: | |
| scheduled-e2e-tests: | |
| timeout-minutes: 35 | |
| runs-on: ubuntu-latest | |
| name: Run Scheduled E2E Tests | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: npm ci && npx playwright install --with-deps | |
| - name: Run E2E tests | |
| env: | |
| NEXT_PUBLIC_URL: https://e2e-nextjs-vercel-e1mnjlrul-nandinis-projects-ce9532aa.vercel.app/ # Fixed URL | |
| run: | | |
| npx playwright test || echo "Tests failed" > test-failure.log | |
| - name: Upload Playwright Report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: reports | |
| path: playwright-report/ | |
| retention-days: 7 |