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: {