Skip to content

Enable feature flags for the front-end #3243

Enable feature flags for the front-end

Enable feature flags for the front-end #3243

Workflow file for this run

name: E2E
on:
pull_request:
workflow_call:
env:
CI: true
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
test:
name: E2E Tests
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install PHP dependencies
uses: ./.github/actions/install-php
- name: Install JS dependencies
run: npm ci
- name: Build assets
run: npm run build:assets
- name: Install Playwright
run: npx playwright install --with-deps chromium
- name: Start wp-env
run: npm run wp-env start
- name: Store wp-env logs
run: npm run wp-env logs tests --watch > logs.txt &
- name: Run Playwright tests with @setup annotation
run: CI=true npm run test:e2e -- --grep @setup
- name: Run Playwright tests without the @setup annotation
run: CI=true npm run test:e2e -- --grep-invert @setup
- name: Archive logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: logs
path: logs.txt
retention-days: 10
if-no-files-found: ignore
- name: Archive report
uses: actions/upload-artifact@v3
if: failure()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
if-no-files-found: ignore