E2E #486
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E | |
on: | |
push: | |
branches: [ci-e2e/*, "*/e2e/*"] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: 0 1 * * 1-5 # every night before week day, at 1am on dev | |
env: | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
jobs: | |
compile: | |
name: Compile application | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: ./.github/actions/setup-node | |
- name: Yarn install | |
run: yarn --frozen-lockfile --perfer-offline | |
- name: Compiling | |
run: | | |
yarn compile --no-progress | |
yarn compile-workers --no-progress | |
env: | |
SKIP_SENTRY_UPLOAD: 1 | |
TRACKER_MATOMO_ID_SITE: ${{ secrets.TRACKER_MATOMO_ID_SITE }} | |
TRACKER_MATOMO_URL: ${{ secrets.TRACKER_MATOMO_URL }} | |
TRACKER_PROVIDER: debug | |
TRACKER_POSTHOG_API_KEY: ${{ secrets.TRACKER_POSTHOG_API_KEY }} | |
TRACKER_POSTHOG_URL: ${{ secrets.TRACKER_POSTHOG_URL }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_URL: ${{ secrets.SENTRY_URL }} | |
CACHE_PROVIDER: file | |
- name: Archive dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: compile-dist | |
path: dist/ | |
E2E: | |
env: | |
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron | |
name: Run E2E test on ${{ matrix.os }} | |
needs: compile | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: ./.github/actions/setup-node | |
- name: Yarn install | |
run: | | |
yarn config set network-timeout 300000 | |
yarn --frozen-lockfile --perfer-offline | |
- name: Download dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: compile-dist | |
path: dist/ | |
- name: Test electron | |
run: yarn electron -v | |
- name: Install Playwright deps | |
run: yarn playwright install-deps chromium | |
- name: Start Xvfb server | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
uses: ./.github/actions/start-xvfb | |
- name: Run Playwright | |
timeout-minutes: 15 | |
run: yarn test:e2e | |
- name: Clean Xvfb | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
uses: ./.github/actions/kill-xvfb |