ci: remove self-host in build.yml (#1363)

Co-authored-by: DarkSky <darksky2048@gmail.com>
This commit is contained in:
Himself65
2023-03-07 05:24:41 -06:00
committed by GitHub
parent e0dd94ae41
commit bc9d470d08
2 changed files with 80 additions and 32 deletions

View File

@@ -1,4 +1,7 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import type {
PlaywrightTestConfig,
PlaywrightWorkerOptions,
} from '@playwright/test';
// import { devices } from '@playwright/test';
/**
@@ -12,9 +15,12 @@ import type { PlaywrightTestConfig } from '@playwright/test';
*/
const config: PlaywrightTestConfig = {
testDir: './tests',
timeout: 30 * 1000,
fullyParallel: true,
timeout: process.env.CI ? 50_000 : 30_000,
use: {
browserName: 'chromium',
browserName:
(process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??
'chromium',
viewport: { width: 1440, height: 800 },
actionTimeout: 5 * 1000,
locale: 'en-US',
@@ -25,11 +31,13 @@ const config: PlaywrightTestConfig = {
// Record video only when retrying a test for the first time.
video: 'on-first-retry',
},
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 3 : 0,
workers: process.env.CI ? '100%' : undefined,
workers: 4,
retries: 1,
// 'github' for GitHub Actions CI to generate annotations, plus a concise 'dot'
// default 'list' when running locally
// See https://playwright.dev/docs/test-reporters#github-actions-annotations
reporter: process.env.CI ? 'github' : 'list',
webServer: {
command: 'pnpm build && pnpm start -p 8080',
@@ -41,11 +49,11 @@ const config: PlaywrightTestConfig = {
ENABLE_DEBUG_PAGE: '1',
},
},
// 'github' for GitHub Actions CI to generate annotations, plus a concise 'dot'
// default 'list' when running locally
// See https://playwright.dev/docs/test-reporters#github-actions-annotations
reporter: process.env.CI ? 'github' : 'list',
};
if (process.env.CI) {
config.retries = 3;
config.workers = '50%';
}
export default config;