Skip to content

Fix: Prevent ts-morph call stack errors with compiler options #88

Fix: Prevent ts-morph call stack errors with compiler options

Fix: Prevent ts-morph call stack errors with compiler options #88

name: Test
on:
pull_request:
types:
# If the pull request description is edited the e2e tests will run again.
# E.g. when checking / unchecking the command checkbox.
- edited
# Add back the default event types.
- opened
- synchronize
- reopened
jobs:
playwright:
if: github.event.pull_request.state == 'open' && contains(github.event.pull_request.body, '- [x] /end-to-end-tests')
timeout-minutes: 30
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.shard }}
cancel-in-progress: true
env:
DEBUG: pw:browser*
SHARD_TOTAL: 5
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
shard: [1, 2, 3, 4, 5]
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: "package.json"
- name: Setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: Install dependencies
run: pnpm i
- name: Install Playwright browsers
run: npx playwright install chromium
- name: Turn off unprivileged restriction
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Run end-to-end tests
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm test:e2e --shard ${{ matrix.shard }}/${{ env.SHARD_TOTAL }}
env:
# This is passed to a config option inside the Playwright config for the blob filename.
PWTEST_BLOB_NAME: ${{ matrix.os }}-${{ matrix.shard }}
- name: Run end-to-end tests
if: ${{ !startsWith(matrix.os, 'ubuntu-') }}
run: pnpm test:e2e --shard ${{ matrix.shard }}/${{ env.SHARD_TOTAL }}
env:
# This is passed to a config option inside the Playwright config for the blob filename.
PWTEST_BLOB_NAME: ${{ matrix.os }}-${{ matrix.shard }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: blob-report-${{ matrix.os }}-${{ matrix.shard }}
path: blob-report
retention-days: 1
merge-reports:
# Merge reports after playwright-tests, even if some shards have failed
if: ${{ !cancelled() && needs.playwright.result != 'skipped' }}
needs: playwright
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: "package.json"
- name: Setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: Install dependencies
run: pnpm i
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
pattern: blob-report-*
path: all-blob-reports
merge-multiple: true
- name: Merge into HTML Report
run: npx playwright merge-reports --reporter html,github --config test/merge.config.ts ./all-blob-reports
- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 14