Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion .github/workflows/tests_primary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,26 @@ jobs:
env:
DEBUG: pw:install
- run: npm run build

- run: npx playwright install --with-deps
- run: npm run test-html-reporter
env:
PWTEST_BLOB_REPORT_NAME: "web-components-html-reporter"
- name: Upload blob report
if: always()
uses: ./.github/actions/upload-blob-report
with:
report_dir: packages/html-reporter/blob-report

- run: npm run test-web
if: always()
env:
PWTEST_BLOB_REPORT_NAME: "web-components-web"
- name: Upload blob report
if: always()
uses: ./.github/actions/upload-blob-report
with:
report_dir: packages/web/blob-report

test_vscode_extension:
name: VSCode Extension
Expand Down Expand Up @@ -189,9 +205,16 @@ jobs:
working-directory: ./playwright-vscode
- name: Run extension tests
run: npm run test -- --workers=1
env:
PWTEST_BLOB_REPORT_NAME: "vscode-extension"
working-directory: ./playwright-vscode
- name: Upload blob report
if: always()
uses: ./.github/actions/upload-blob-report
with:
report_dir: ./playwright-vscode/blob-report

test-package-installations:
test_package_installations:
name: "Installation Test ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -214,8 +237,17 @@ jobs:
- run: npx playwright install-deps
- run: npm run itest
if: matrix.os != 'ubuntu-latest'
env:
PWTEST_BLOB_REPORT_NAME: "package-installations-${{ matrix.os }}"
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run itest
if: matrix.os == 'ubuntu-latest'
env:
PWTEST_BLOB_REPORT_NAME: "package-installations-${{ matrix.os }}"
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
if: always()
shell: bash
- name: Upload blob report
if: always()
uses: ./.github/actions/upload-blob-report
with:
report_dir: blob-report
2 changes: 1 addition & 1 deletion packages/html-reporter/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
snapshotPathTemplate: '{testDir}/__screenshots__/{projectName}/{testFilePath}/{arg}{ext}',
reporter: 'html',
reporter: process.env.CI ? 'blob' : 'html',
use: {
ctPort: 3101,
trace: 'on-first-retry',
Expand Down
13 changes: 12 additions & 1 deletion packages/web/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@
*/

import { devices, defineConfig } from '@playwright/experimental-ct-react';
import type { ReporterDescription } from '@playwright/test';

const reporters = () => {
const result: ReporterDescription[] = process.env.CI ? [
['html'],
['blob'],
] : [
['html']
];
return result;
};

export default defineConfig({
testDir: 'src',
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: 'html',
reporter: reporters(),
use: {
ctPort: 3102,
trace: 'on-first-retry',
Expand Down
18 changes: 14 additions & 4 deletions tests/installation/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,30 @@

import path from 'path';
import { defineConfig } from '@playwright/test';
import type { ReporterDescription } from '@playwright/test';
import { config as loadEnv } from 'dotenv';
loadEnv({ path: path.join(__dirname, '..', '..', '.env') });

const reporters = () => {
const result: ReporterDescription[] = process.env.CI ? [
['dot'],
['json', { outputFile: path.join(outputDir, 'report.json') }],
['blob'],
] : [
['list'],
['html', { open: 'on-failure' }]
];
return result;
};

const outputDir = path.join(__dirname, '..', '..', 'test-results');
export default defineConfig({
globalSetup: path.join(__dirname, 'globalSetup'),
outputDir,
testIgnore: '**\/fixture-scripts/**',
timeout: 5 * 60 * 1000,
retries: 0,
reporter: process.env.CI ? [
['dot'],
['json', { outputFile: path.join(outputDir, 'report.json') }],
] : [['list'], ['html', { open: 'on-failure' }]],
reporter: reporters(),
forbidOnly: !!process.env.CI,
workers: 1,
projects: [
Expand Down