mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-18 13:34:06 +01:00
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Playwright Tests
|
|
|
|
on: pull_request
|
|
|
|
jobs:
|
|
build:
|
|
timeout-minutes: 10
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
|
|
- name: Ci caching
|
|
uses: actions/cache@v4
|
|
id: ci-cache
|
|
with:
|
|
path: |
|
|
~/.npm
|
|
${{ github.workspace }}/.next/cache
|
|
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
|
|
- run: npm ci
|
|
if: steps.ci-cache.outputs.cache-hit != 'true'
|
|
|
|
- name: Cache playwright binaries
|
|
uses: actions/cache@v4
|
|
id: playwright-cache
|
|
with:
|
|
path: |
|
|
~/.cache/ms-playwright
|
|
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
|
|
- run: npx playwright install --with-deps
|
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
- run: npx playwright install-deps
|
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
|
|
- name: Run Playwright tests
|
|
run: npx playwright test
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: ${{ !cancelled() }}
|
|
with:
|
|
name: playwright-report
|
|
path: playwright-report/
|
|
retention-days: 30
|