Playwright CI #21
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 CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '*/5 * * * *' # Runs every 5 minutes | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' # Specify the Node.js version | |
- name: Install dependencies | |
run: npm install | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npx playwright test --reporter=list | |
- name: Upload test results | |
if: always() # Upload results even if tests fail | |
uses: actions/upload-artifact@v4 | |
with: | |
name: playwright-results | |
path: test-results/ # Adjust the path as needed |