ci: start devServer before test running to avoid tests timeout (#11297)

This commit is contained in:
Brooooooklyn
2025-03-31 10:39:34 +00:00
parent eda680ccdc
commit 47a8d15878
10 changed files with 117 additions and 73 deletions
+8 -4
View File
@@ -7,7 +7,7 @@ import { PerfseePlugin } from '@perfsee/webpack';
import { sentryWebpackPlugin } from '@sentry/webpack-plugin';
import { VanillaExtractPlugin } from '@vanilla-extract/webpack-plugin';
import CopyPlugin from 'copy-webpack-plugin';
import compact from 'lodash-es/compact';
import { compact } from 'lodash-es';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import TerserPlugin from 'terser-webpack-plugin';
import webpack from 'webpack';
@@ -227,7 +227,7 @@ export function createWebpackConfig(
},
{
test: /\.(ttf|eot|woff|woff2)$/,
type: 'asset/resource',
type: IN_CI ? 'asset/inline' : 'asset/resource',
},
{
test: /\.txt$/,
@@ -313,7 +313,7 @@ export function createWebpackConfig(
{} as Record<string, string>
),
}),
buildConfig.isAdmin
buildConfig.isAdmin && flags.mode !== 'production'
? null
: new CopyPlugin({
patterns: [
@@ -360,7 +360,11 @@ export function createWebpackConfig(
directory: pkg.workspace.getPackage('@affine/core').join('public')
.value,
publicPath: '/',
watch: true,
watch: !IN_CI,
staticOptions: {
immutable: IN_CI,
maxAge: '1d',
},
},
],
proxy: [