Daily Playwright Run #2
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: Daily Playwright Run | |
| on: | |
| schedule: | |
| - cron: "30 12 * * *" # runs daily at 5 AM UTC | |
| workflow_dispatch: # allows manual run | |
| jobs: | |
| test-and-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps | |
| - name: Run Playwright tests | |
| run: npx playwright test | |
| - name: Commit daily.txt update | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "[email protected]" | |
| git add "reports/Daily Run/daily.txt" | |
| git commit -m "Daily Playwright status update" || echo "No changes to commit" | |
| git push |