From 2f0c092458ca25b5585c3a6a0fc3e8145668d014 Mon Sep 17 00:00:00 2001 From: Max Eliseev Date: Thu, 3 Feb 2022 11:32:39 +0500 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=20?= =?UTF-8?q?Playwright=20=D0=B2=20Github=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/playwright-test.yaml | 24 ++++++++++++++++++++++++ playwright.config.ts | 1 + 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/playwright-test.yaml diff --git a/.github/workflows/playwright-test.yaml b/.github/workflows/playwright-test.yaml new file mode 100644 index 0000000..145c6fb --- /dev/null +++ b/.github/workflows/playwright-test.yaml @@ -0,0 +1,24 @@ +name: Run Playwright E2E tests +on: [pull_request] + +steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm ci + + - name: Install Playwright + run: npx playwright install --with-deps + + - name: Run your tests + run: npm run test:e2e + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v2 + with: + name: playwright-results + path: test-results diff --git a/playwright.config.ts b/playwright.config.ts index 9e0956d..237cc1e 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -7,6 +7,7 @@ const isCI = !!process.env.CI const config: PlaywrightTestConfig = { forbidOnly: isCI, retries: isCI ? 2 : 0, + reporter: isCI ? "github" : "list", testDir: "./tests", testMatch: /.*\.test\.ts/, use: {