This commit is contained in:
Nantawat Sukrisunt 2024-10-21 21:04:27 +07:00
parent b65b735bc4
commit d5aed41ee0

View File

@ -1,27 +1,23 @@
name: Playwright Tests name: Playwright Tests
on: on: [ push, pull_request ]
push: jobs:
branches: [ main, master ] test:
pull_request: timeout-minutes: 60
branches: [ main, master ] runs-on: ubuntu-latest
jobs: steps:
test: - uses: actions/checkout@v4
timeout-minutes: 60 - uses: actions/setup-node@v4
runs-on: ubuntu-latest with:
steps: node-version: lts/*
- uses: actions/checkout@v4 - name: Install dependencies
- uses: actions/setup-node@v4 run: npm ci
with: - name: Install Playwright Browsers
node-version: lts/* run: npx playwright install --with-deps
- name: Install dependencies - name: Run Playwright tests
run: npm ci run: npx playwright test
- name: Install Playwright Browsers - uses: actions/upload-artifact@v4
run: npx playwright install --with-deps if: ${{ !cancelled() }}
- name: Run Playwright tests with:
run: npx playwright test name: playwright-report
- uses: actions/upload-artifact@v4 path: playwright-report/
if: ${{ !cancelled() }} retention-days: 30
with:
name: playwright-report
path: playwright-report/
retention-days: 30