From 9f7202c2c531284bc8644b859f54c37ee5291be8 Mon Sep 17 00:00:00 2001 From: danactive Date: Sat, 26 Aug 2023 11:18:17 -0700 Subject: [PATCH] Next > CI: Add Playwright end-to-end test workflow --- .github/workflows/ci.yaml | 22 ++++++++++++++++++++++ .github/workflows/playwright.yml | 29 ----------------------------- 2 files changed, 22 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/playwright.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a21f387e..267a12d7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -76,3 +76,25 @@ jobs: - name: Unit Test runner run: npm run test:ci working-directory: next + e2etest: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: "next/.nvmrc" + - name: 📥 Download deps + uses: bahmutov/npm-install@v1 + with: + working-directory: next + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + run: npx playwright test + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index 47afb716..00000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Playwright Tests -on: - push: - branches: - - main - pull_request: {} -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version-file: "next/.nvmrc" - - name: 📥 Download deps - uses: bahmutov/npm-install@v1 - with: - working-directory: next - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v3 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30