Skip to content

Commit

Permalink
feat: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arein committed Jan 12, 2024
1 parent 6a7464f commit a8a00e0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 34 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/playwright.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/ui_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
# Support push/pr as event types with different behaviors each:
# 1. push: queue up builds
# 2. pr: only allow one run per PR
group: ${{ github.workflow }}-${{ github.event.type }}${{ github.event.pull_request.number }}
# If there is already a workflow running for the same pull request, cancel it
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test:
timeout-minutes: 10
Expand Down
8 changes: 3 additions & 5 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@ export default defineConfig({
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
retries: 0,
/* Parallel tests currently blocked. */
workers: 1,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL,

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',

screenshot: 'only-on-failure',
video: 'retain-on-failure'
},
Expand Down

0 comments on commit a8a00e0

Please sign in to comment.