ci: speedup ci by reduce installation packages in certain job (#4457)

This commit is contained in:
LongYinan
2023-09-29 11:02:26 +08:00
committed by GitHub
parent b012e615ba
commit dd94ea5b45
84 changed files with 2954 additions and 2271 deletions

View File

@@ -7,7 +7,7 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.37.1"
"@playwright/test": "^1.38.1"
},
"version": "0.9.0-canary.13"
}

View File

@@ -7,8 +7,8 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.37.1",
"@types/fs-extra": "^11.0.1",
"@playwright/test": "^1.38.1",
"@types/fs-extra": "^11.0.2",
"fs-extra": "^11.1.1"
},
"version": "0.9.0-canary.13"

View File

@@ -7,9 +7,10 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.37.1",
"@types/fs-extra": "^11.0.1",
"fs-extra": "^11.1.1"
"@playwright/test": "^1.38.1",
"@types/fs-extra": "^11.0.2",
"fs-extra": "^11.1.1",
"playwright": "^1.38.1"
},
"version": "0.9.0-canary.13"
}

View File

@@ -1,3 +1,4 @@
static
fixtures/*.ydoc
test-results
*.zip

View File

@@ -2,7 +2,7 @@
"name": "@affine-legacy/0.7.0-canary.18",
"description": "AFFiNE 0.7.0-canary.18 static output",
"scripts": {
"unzip": "unzip affine-web -d static",
"unzip": "wget -O static.zip https://github.com/toeverything/AFFiNE/releases/download/v0.7.0-canary.18/web-static.zip && unzip static.zip -d static",
"start": "yarn exec serve -s static -l 8082",
"e2e": "yarn playwright test",
"test": "vitest --run"
@@ -14,7 +14,7 @@
"@blocksuite/blocks": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/global": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/store": "0.0.0-20230926212737-6d4b1569-nightly",
"@playwright/test": "^1.37.1",
"@playwright/test": "^1.38.1",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
"serve": "^14.2.1"

View File

@@ -1,3 +1,5 @@
static
web-static
fixtures/*.ydoc
test-results
*.zip

View File

@@ -1,4 +1,4 @@
import { resolve } from 'node:path';
import { join } from 'node:path';
import { clickEdgelessModeButton } from '@affine-test/kit/utils/editor';
import { waitForEditorLoad } from '@affine-test/kit/utils/page-logic';
@@ -10,7 +10,7 @@ import { expect, test } from '@playwright/test';
const { switchToNext } = setupProxyServer(
test,
resolve(__dirname, '..', 'static')
join(__dirname, '..', 'web-static')
);
test('database migration', async ({ page, context }) => {

View File

@@ -2,8 +2,8 @@
"name": "@affine-legacy/0.8.0-canary.7",
"description": "AFFiNE 0.8.0-canary.7 static output",
"scripts": {
"unzip": "unzip affine-core -d static",
"start": "yarn exec serve -s static -l 8082",
"unzip": "wget -O static.zip https://github.com/toeverything/AFFiNE/releases/download/v0.8.0-canary.7/web-static.zip && unzip static.zip",
"start": "yarn exec serve -s web-static -l 8082",
"e2e": "yarn playwright test"
},
"devDependencies": {

View File

@@ -1,3 +1,5 @@
static
fixtures/*.ydoc
test-results
*.zip
web-static

View File

@@ -1,4 +1,4 @@
import { resolve } from 'node:path';
import { join } from 'node:path';
import { clickEdgelessModeButton } from '@affine-test/kit/utils/editor';
import {
@@ -13,7 +13,7 @@ import { expect, test } from '@playwright/test';
const { switchToNext } = setupProxyServer(
test,
resolve(__dirname, '..', 'static')
join(__dirname, '..', 'web-static')
);
test('surface migration', async ({ page, context }) => {

View File

@@ -1,9 +1,9 @@
{
"name": "@affine-legacy/0.8.3",
"description": "AFFiNE 0.8.3 static output",
"name": "@affine-legacy/0.8.4",
"description": "AFFiNE 0.8.4 static output",
"scripts": {
"unzip": "unzip affine-core -d static",
"start": "yarn exec serve -s static -l 8082",
"unzip": "wget -O static.zip https://github.com/toeverything/AFFiNE/releases/download/v0.8.4/web-static.zip && unzip static.zip",
"start": "yarn exec serve -s web-static -l 8082",
"e2e": "yarn playwright test"
},
"devDependencies": {
@@ -13,7 +13,7 @@
"@blocksuite/blocks": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/global": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/store": "0.0.0-20230926212737-6d4b1569-nightly",
"@playwright/test": "^1.37.1",
"@playwright/test": "^1.38.1",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
"serve": "^14.2.1"

View File

@@ -5,7 +5,7 @@ import type {
const config: PlaywrightTestConfig = {
testDir: './e2e',
fullyParallel: true,
fullyParallel: !process.env.CI,
timeout: process.env.CI ? 50_000 : 30_000,
use: {
baseURL: 'http://localhost:8081/',
@@ -20,7 +20,7 @@ const config: PlaywrightTestConfig = {
video: 'on-first-retry',
},
forbidOnly: !!process.env.CI,
workers: 4,
workers: process.env.CI ? 1 : 4,
retries: 1,
reporter: process.env.CI ? 'github' : 'list',
webServer: [
@@ -39,7 +39,6 @@ const config: PlaywrightTestConfig = {
if (process.env.CI) {
config.retries = 3;
config.workers = '50%';
}
export default config;

View File

@@ -7,7 +7,7 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.37.1"
"@playwright/test": "^1.38.1"
},
"version": "0.9.0-canary.13"
}

View File

@@ -7,7 +7,7 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.37.1"
"@playwright/test": "^1.38.1"
},
"version": "0.9.0-canary.13"
}

View File

@@ -14,8 +14,8 @@ import {
} from './playwright';
import { removeWithRetry } from './utils/utils';
const projectRoot = resolve(__dirname, '..', '..');
const electronRoot = resolve(projectRoot, 'apps', 'electron');
const projectRoot = join(__dirname, '..', '..');
const electronRoot = join(projectRoot, 'apps', 'electron');
function generateUUID() {
return crypto.randomUUID();
@@ -99,7 +99,7 @@ export const test = base.extend<{
args: [clonedDist],
env,
executablePath: resolve(
electronRoot,
projectRoot,
'node_modules',
'.bin',
`electron${ext}`

View File

@@ -10,7 +10,7 @@
},
"devDependencies": {
"@node-rs/argon2": "^1.5.2",
"@playwright/test": "^1.37.1",
"@playwright/test": "^1.38.1",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1"
},