mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-21 15:36:50 -05:00
* actions/setup-node * actions/cache * actions/checkout * docker/* * actions/*-artifact * actions/stale * others * note
142 lines
5.1 KiB
YAML
142 lines
5.1 KiB
YAML
name: E2E Tests
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'packages/**'
|
|
- 'package.json'
|
|
- 'yarn.lock'
|
|
- '.github/workflows/e2e-test.yml'
|
|
- '!packages/sync-server/**' # Sync server changes don't affect E2E tests
|
|
- '!packages/api/**' # API changes don't affect E2E tests
|
|
- '!packages/ci-actions/**' # CI actions changes don't affect E2E tests
|
|
- '!packages/docs/**' # Docs changes don't affect E2E tests
|
|
- '!packages/eslint-plugin-actual/**' # Eslint plugin changes don't affect E2E tests
|
|
merge_group:
|
|
|
|
env:
|
|
GITHUB_PR_NUMBER: ${{github.event.pull_request.number}}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
functional:
|
|
name: Functional (shard ${{ matrix.shard }}/5)
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [1, 2, 3, 4, 5]
|
|
container:
|
|
image: mcr.microsoft.com/playwright:v1.58.2-jammy
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
- name: Trust the repository directory
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
- name: Run E2E Tests
|
|
run: yarn e2e --shard=${{ matrix.shard }}/5
|
|
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
if: always()
|
|
with:
|
|
name: desktop-client-test-results-shard-${{ matrix.shard }}
|
|
path: packages/desktop-client/test-results/
|
|
retention-days: 30
|
|
overwrite: true
|
|
|
|
functional-desktop-app:
|
|
name: Functional Desktop App
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: mcr.microsoft.com/playwright:v1.58.2-jammy
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
- name: Trust the repository directory
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
- name: Run Desktop app E2E Tests
|
|
run: |
|
|
xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" -- yarn e2e:desktop
|
|
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
if: always()
|
|
with:
|
|
name: desktop-app-test-results
|
|
path: packages/desktop-electron/e2e/test-results/
|
|
retention-days: 30
|
|
overwrite: true
|
|
|
|
vrt:
|
|
name: Visual regression (shard ${{ matrix.shard }}/5)
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [1, 2, 3, 4, 5]
|
|
container:
|
|
image: mcr.microsoft.com/playwright:v1.58.2-jammy
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
- name: Run VRT Tests
|
|
run: yarn vrt --shard=${{ matrix.shard }}/5
|
|
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
if: always()
|
|
with:
|
|
name: vrt-blob-report-${{ matrix.shard }}
|
|
path: packages/desktop-client/blob-report/
|
|
retention-days: 1
|
|
overwrite: true
|
|
|
|
merge-vrt:
|
|
name: Merge VRT Reports
|
|
needs: vrt
|
|
runs-on: ubuntu-latest
|
|
if: ${{ !cancelled() }}
|
|
container:
|
|
image: mcr.microsoft.com/playwright:v1.58.2-jammy
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
- name: Download all blob reports
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
path: packages/desktop-client/all-blob-reports
|
|
pattern: vrt-blob-report-*
|
|
merge-multiple: true
|
|
- name: Merge reports
|
|
id: merge-reports
|
|
run: yarn workspace @actual-app/web run playwright merge-reports --reporter html ./all-blob-reports
|
|
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
id: playwright-report-vrt
|
|
with:
|
|
name: html-report--attempt-${{ github.run_attempt }}
|
|
path: packages/desktop-client/playwright-report
|
|
retention-days: 30
|
|
overwrite: true
|
|
- name: Save VRT metadata for comment workflow
|
|
if: github.event_name == 'pull_request'
|
|
run: |
|
|
mkdir -p vrt-metadata
|
|
echo "${{ github.event.pull_request.number }}" > vrt-metadata/pr-number.txt
|
|
echo "${{ needs.vrt.result }}" > vrt-metadata/vrt-result.txt
|
|
echo "${{ steps.playwright-report-vrt.outputs.artifact-url }}" > vrt-metadata/artifact-url.txt
|
|
- name: Upload VRT metadata
|
|
if: github.event_name == 'pull_request'
|
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
with:
|
|
name: vrt-comment-metadata
|
|
path: vrt-metadata/
|
|
retention-days: 1
|