mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-26 19:15:25 +03:00
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: Playwright Tests
|
|
on:
|
|
schedule:
|
|
- cron: "0 6 * * *"
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
playwright:
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
cache: "pnpm"
|
|
cache-dependency-path: |
|
|
pnpm-lock.yaml
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Get installed Playwright version
|
|
id: playwright-version
|
|
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./app/package.json').devDependencies['@playwright/test'].substring(1))")" >> $GITHUB_ENV
|
|
- name: Cache playwright binaries
|
|
uses: actions/cache@v4
|
|
id: playwright-cache
|
|
with:
|
|
path: |
|
|
~/.cache/ms-playwright
|
|
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
|
|
- name: Install Playwright Browsers
|
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
run: pnpm dlx "playwright@$PLAYWRIGHT_VERSION" install --with-deps chromium
|
|
- name: Run Tests
|
|
run: cd app && pnpm test:e2e
|
|
env:
|
|
CI: true
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
if: ${{ !cancelled() }}
|
|
with:
|
|
name: playwright-report
|
|
path: app/test-results/**/trace.zip
|
|
if-no-files-found: ignore
|
|
retention-days: 30
|