fix(ci): generate locale and channel files before typecheck (#2320)

This commit is contained in:
Hampus
2026-09-01 20:47:16 +02:00
committed by GitHub
parent 90aa810ce4
commit 2d77f36a0b
5 changed files with 17 additions and 6 deletions
+1
View File
@@ -70,6 +70,7 @@ stage "app: typecheck" pnpm --filter fluxer_app typecheck
stage "app: unit tests" pnpm --filter fluxer_app exec vitest run
if [ "$QUICK" -eq 0 ]; then
stage "desktop: typecheck" pnpm --filter fluxer_desktop typecheck
stage "app: production build" pnpm --filter fluxer_app build
fi
+1 -1
View File
@@ -22,7 +22,7 @@
"bench:gif-picker": "vitest bench --run src/features/channel/components/pickers/gif/GifPickerStateMachine.bench.ts src/features/channel/components/pickers/gif/GifPickerGridData.bench.ts src/features/channel/components/pickers/gif/GifPickerLoadingSkeletonGridLayout.bench.ts src/features/channel/components/pickers/shared/TileFlowSolver.bench.ts",
"bench:messages": "vitest bench --run src/features/messaging/utils/MessageGroupingUtils.bench.ts src/features/channel/components/ChannelMessageStreamUtils.bench.ts src/features/messaging/components/markdown/MarkdownRendering.bench.ts src/features/channel/components/MessageAttachmentUtils.bench.ts src/features/messaging/utils/MessagePaginationUtils.bench.ts src/features/platform/utils/ScrollPosition.bench.ts src/features/messaging/state/ReactionStateMachine.bench.ts",
"test:watch": "vitest",
"typecheck": "pnpm wasm:codegen && pnpm generate:colors && pnpm generate:message-layout && pnpm generate:theme-variables && pnpm generate:masks && pnpm generate:css-types && tsgo --noEmit",
"typecheck": "pnpm wasm:codegen && pnpm generate:colors && pnpm generate:message-layout && pnpm generate:theme-variables && pnpm generate:masks && pnpm generate:css-types && pnpm lingui:compile && tsgo --noEmit",
"typecheck:only": "tsgo --noEmit",
"check:message-layout": "pnpm tsx scripts/GenerateMessageLayoutCss.ts --check",
"generate:colors": "pnpm tsx scripts/GenerateColorSystem.ts",
+1 -1
View File
@@ -12,7 +12,7 @@
"build": "node scripts/build.mjs",
"set-channel": "../tools/ci/run.sh build-desktop --step set_build_channel",
"test": "cargo test --manifest-path native/rust/Cargo.toml",
"typecheck": "tsgo --noEmit"
"typecheck": "pnpm set-channel && tsgo --noEmit"
},
"dependencies": {
"@fluxer/voice_engine_v2": "workspace:*",
+13 -3
View File
@@ -43,7 +43,6 @@ pub async fn run_ci(args: CiArgs) -> Result<()> {
.current_dir(root),
),
CiStep::Typecheck => {
ensure_desktop_build_channel_file(&root)?;
run_generators(&root, true)?;
run_app_test_artifact_generators(&root, AppWasm::Build)?;
run_command(
@@ -155,8 +154,9 @@ fn generator_commands(for_typecheck: bool) -> Vec<CommandSpec> {
"@fluxer/i18n",
"generate:types",
]));
} else {
commands.push(CommandSpec::new("pnpm").args(["--filter", "fluxer_app", "i18n:compile"]));
}
commands.push(CommandSpec::new("pnpm").args(["--filter", "fluxer_app", "i18n:compile"]));
commands
}
@@ -226,7 +226,7 @@ mod tests {
use super::*;
#[test]
fn generator_commands_include_i18n_types_only_for_typecheck() {
fn generator_commands_split_i18n_types_and_compile_by_step() {
let typecheck = generator_commands(true)
.into_iter()
.map(|command| command.args)
@@ -246,6 +246,16 @@ mod tests {
OsString::from("@fluxer/i18n"),
OsString::from("generate:types"),
]));
assert!(!typecheck.contains(&vec![
OsString::from("--filter"),
OsString::from("fluxer_app"),
OsString::from("i18n:compile"),
]));
assert!(test.contains(&vec![
OsString::from("--filter"),
OsString::from("fluxer_app"),
OsString::from("i18n:compile"),
]));
}
#[test]
+1 -1
View File
@@ -45,7 +45,7 @@ fn run_generators(for_typecheck: bool) -> Result<()> {
task_run(&["pnpm", "--filter", "@fluxer/config", "generate"])?;
task_run(&["pnpm", "--filter", "@fluxer/schema", "generate"])?;
if for_typecheck {
task_run(&["pnpm", "--filter", "@fluxer/i18n", "generate:types"])?;
return task_run(&["pnpm", "--filter", "@fluxer/i18n", "generate:types"]);
}
task_run(&["pnpm", "--filter", "fluxer_app", "i18n:compile"])
}