There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
feat(core): separate runtimeConfig for e2e tests and deployment (#5976)
JimmFlyffda9a05677d
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.ymlindex b3c6d21463..dc66c88f61 100644--- a/.github/workflows/build-test.yml+++ b/.github/workflows/build-test.yml@@ -118,6 +118,7 @@ jobs:runs-on: ubuntu-latestenv:DISTRIBUTION: browser+ IN_CI_TEST: truestrategy:fail-fast: falsematrix:@@ -370,6 +371,7 @@ jobs:env:DISTRIBUTION: browserDATABASE_URL: postgresql://affine:affine@localhost:5432/affine+ IN_CI_TEST: truestrategy:fail-fast: falsematrix:diff --git a/packages/frontend/core/.webpack/runtime-config.ts b/packages/frontend/core/.webpack/runtime-config.tsindex a712f409d2..5e43f8f11b 100644--- a/packages/frontend/core/.webpack/runtime-config.ts+++ b/packages/frontend/core/.webpack/runtime-config.ts@@ -147,6 +147,10 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {: currentBuildPreset.allowLocalWorkspace,};+ const testEnvironmentPreset = {+ allowLocalWorkspace: true,+ };+if (buildFlags.mode === 'development') {currentBuildPreset.serverUrlPrefix = 'http://localhost:8080';}@@ -156,6 +160,10 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {// environment preset will overwrite current build preset// this environment variable is for debug proposes only// do not put them into CI- ...(process.env.CI ? { allowLocalWorkspace: true } : environmentPreset),+ ...(process.env.CI ? {} : environmentPreset),++ // test environment preset will overwrite current build preset+ // this environment variable is for github workflow e2e-test only+ ...(process.env.IN_CI_TEST ? testEnvironmentPreset : {}),};}