From f2ff1919cb3becdceb0a2fc3c8122b120390d9f1 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 18 Mar 2025 13:48:23 -0400 Subject: [PATCH] Move all tests into one workflow, give them clear names The Playwright tests had no name before, making it confusing to add them to the branch protection requirements. --- .github/workflows/playwright.yml | 33 -------------------------------- .github/workflows/test.yaml | 32 +++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/playwright.yml diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index ce993670..00000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Playwright Tests -on: - pull_request: {} - push: - branches: [livekit, full-mesh] -jobs: - test: - timeout-minutes: 10 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - cache: "yarn" - node-version-file: ".node-version" - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: Install Playwright Browsers - run: yarn playwright install --with-deps - - name: Run backend components - run: | - docker compose -f playwright-backend-docker-compose.yml up -d - docker ps - - name: Copy config file - run: cp config/config.devenv.json public/config.json - - name: Run Playwright tests - run: yarn playwright test - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: playwright-report - path: playwright-report/ - retention-days: 3 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8f933f8f..898a05c6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,11 +1,11 @@ -name: Run unit tests +name: Test on: pull_request: {} push: branches: [livekit, full-mesh] jobs: vitest: - name: Run vitest tests + name: Run unit tests runs-on: ubuntu-latest steps: - name: Checkout code @@ -26,3 +26,31 @@ jobs: with: flags: unittests fail_ci_if_error: true + playwright: + name: Run end-to-end tests + timeout-minutes: 10 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + cache: "yarn" + node-version-file: ".node-version" + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Install Playwright Browsers + run: yarn playwright install --with-deps + - name: Run backend components + run: | + docker compose -f playwright-backend-docker-compose.yml up -d + docker ps + - name: Copy config file + run: cp config/config.devenv.json public/config.json + - name: Run Playwright tests + run: yarn playwright test + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: playwright-report/ + retention-days: 3