Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

ci: drop eunit and desktop test runs, add env and email checks

Hampus6ef08e39ce2a
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index a210c7972..d548aeeb7 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -89,22 +89,10 @@ jobs:
run: |
"$FLUXER_CI_BIN" ci --step install_dependencies
- - name: Restore fluxer_app wasm artifacts
- id: app-wasm
- uses: ./.github/actions/app-wasm-cache
- with:
- mode: restore
-
- name: Run tests
run: |
"$FLUXER_CI_BIN" ci --step test
- - name: Save fluxer_app wasm artifacts
- if: always() && github.ref == 'refs/heads/main' && steps.app-wasm.outputs.cache-hit != 'true'
- uses: ./.github/actions/app-wasm-cache
- with:
- mode: save
-
rust:
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 45
@@ -227,12 +215,6 @@ jobs:
FLUXER_REQUIRE_MEDIA_FIXTURES: "1"
run: cargo test --workspace --all-features --locked
- - name: Run tests (libfluxcore)
- run: cargo test --locked --manifest-path fluxer_app/rust/libfluxcore/Cargo.toml
-
- - name: Run desktop native workspace tests on Linux
- run: tools/ci/check-desktop-native-workspaces.sh test
-
gateway:
runs-on: ubuntu-24.04
timeout-minutes: 25
@@ -262,7 +244,7 @@ jobs:
uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124
with:
otp-version: '28'
- rebar3-version: '3.27.0'
+ rebar3-version: '3.27.3'
- name: Restore rebar3 dependencies
id: rebar3-cache
@@ -274,10 +256,10 @@ jobs:
!fluxer_gateway/_build/default/lib/fluxer_gateway/**
!fluxer_gateway/_build/test/lib/fluxer_gateway/**
key: >-
- rebar3-${{ runner.os }}-otp28-rebar3.27.0-${{ hashFiles('fluxer_gateway/rebar.lock',
+ rebar3-${{ runner.os }}-otp28-rebar3.27.3-${{ hashFiles('fluxer_gateway/rebar.lock',
'fluxer_gateway/rebar.config') }}
restore-keys: |
- rebar3-${{ runner.os }}-otp28-rebar3.27.0-
+ rebar3-${{ runner.os }}-otp28-rebar3.27.3-
- name: Drop restored gateway build output
run: rm -rf fluxer_gateway/_build/default/lib/fluxer_gateway fluxer_gateway/_build/test/lib/fluxer_gateway
@@ -294,10 +276,6 @@ jobs:
run: |
"$FLUXER_CI_BIN" ci --step gateway_dialyzer
- - name: Run eunit tests
- run: |
- "$FLUXER_CI_BIN" ci --step gateway_eunit
-
- name: Save rebar3 dependencies
if: always() && github.ref == 'refs/heads/main' && steps.rebar3-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
@@ -308,7 +286,7 @@ jobs:
!fluxer_gateway/_build/default/lib/fluxer_gateway/**
!fluxer_gateway/_build/test/lib/fluxer_gateway/**
key: >-
- rebar3-${{ runner.os }}-otp28-rebar3.27.0-${{ hashFiles('fluxer_gateway/rebar.lock',
+ rebar3-${{ runner.os }}-otp28-rebar3.27.3-${{ hashFiles('fluxer_gateway/rebar.lock',
'fluxer_gateway/rebar.config') }}
knip:
@@ -386,6 +364,9 @@ jobs:
- name: Check data-flx attributes
run: pnpm --filter fluxer_app theming:data-flx:check
+ - name: Check self-host env forwarding
+ run: pnpm --filter @fluxer/config self-host-env:check
+
i18n:
runs-on: ubuntu-24.04
timeout-minutes: 25
@@ -414,6 +395,7 @@ jobs:
packages/errors/src/i18n/weblate \
fluxer_api/pkgs/email/src/email_i18n/weblate \
fluxer_api/pkgs/email/src/email_i18n/EmailI18nTypes.generated.ts \
+ fluxer_api/pkgs/email/src/email_html/EmailHtmlLayouts.generated.ts \
fluxer_api/src/api/content_i18n/weblate; then
echo "::error::Static catalogs are out of sync with their sources. Run 'pnpm i18n:compile' and commit the result."
exit 1
@@ -438,9 +420,6 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter fluxer_docs...
- - name: Verify documentation matches the live API
- run: pnpm --filter fluxer_docs verify
-
- name: Build documentation
run: pnpm --filter fluxer_docs build
diff --git a/package.json b/package.json
index fe55cda50..fcf703497 100644
--- a/package.json
+++ b/package.json
@@ -27,11 +27,11 @@
"docs:build": "pnpm --filter fluxer_docs build",
"docs:dev": "pnpm --filter fluxer_docs dev",
"docs:typecheck": "pnpm --filter fluxer_docs typecheck",
- "i18n:compile": "pnpm --filter fluxer_app i18n:compile && pnpm --filter @fluxer/i18n static:sync && pnpm --filter @fluxer/i18n generate:types",
+ "i18n:compile": "pnpm --filter fluxer_app i18n:compile && pnpm --filter @fluxer/i18n static:sync && pnpm --filter @fluxer/i18n generate:types && pnpm --filter @pkgs/email html:compile",
"i18n:refresh": "pnpm --filter fluxer_app i18n:refresh",
"i18n:source-sync": "pnpm i18n:refresh && pnpm i18n:compile",
"knip": "tools/ci/run.sh ci --step knip",
- "lint": "biome ci && eslint . --max-warnings 0 && pnpm --filter fluxer_app theming:data-flx:check",
+ "lint": "biome ci && eslint . --max-warnings 0 && pnpm --filter fluxer_app theming:data-flx:check && pnpm --filter @fluxer/config self-host-env:check",
"openapi:generate": "pnpm --filter @fluxer/openapi generate",
"openapi:validate": "pnpm --filter @fluxer/openapi validate",
"test": "tools/ci/run.sh ci --step test",
diff --git a/tools/ci/check-desktop-native-workspaces.sh b/tools/ci/check-desktop-native-workspaces.sh
index 2aba32a14..8925d1a4e 100755
--- a/tools/ci/check-desktop-native-workspaces.sh
+++ b/tools/ci/check-desktop-native-workspaces.sh
@@ -51,11 +51,11 @@ fail() {
}
if [ "$#" -ne 1 ]; then
- fail "Usage: $0 dependencies|fmt|clippy|test"
+ fail "Usage: $0 dependencies|fmt|clippy"
fi
case "$mode" in
-dependencies | fmt | clippy | test) ;;
+dependencies | fmt | clippy) ;;
*) fail "Unknown desktop native workspace check: $mode" ;;
esac
@@ -147,17 +147,6 @@ run_clippy_windows_backend() {
-D warnings
}
-run_tests() {
- local manifest="$1"
-
- CI=true CARGO_TARGET_DIR="$native_target_dir" \
- "$cargo_bin" test \
- --manifest-path "$manifest" \
- --workspace \
- --all-features \
- --locked
-}
-
find "$native_root" -type d -name target -prune -o -type f -name Cargo.toml -print | LC_ALL=C sort >"$manifest_list"
if [ ! -s "$manifest_list" ]; then
@@ -199,7 +188,7 @@ if ! diff -u "$expected_inventory" "$discovered_inventory"; then
fail "Desktop native workspace inventory does not match discovery"
fi
-if [ "$mode" = clippy ] || [ "$mode" = test ]; then
+if [ "$mode" = clippy ]; then
host_kernel="$(uname -s)"
if [ "$host_kernel" != Linux ]; then
fail "Desktop native $mode checks require a Linux host, found: $host_kernel"
@@ -237,14 +226,6 @@ while IFS= read -r manifest; do
windows_backend_count=$((windows_backend_count + 1))
fi
;;
- test)
- case "$category" in
- linux) printf 'Test full Linux/shared coverage: %s\n' "$relative_manifest" ;;
- macos) printf 'Test Linux stub/common coverage; macOS backend not validated: %s\n' "$relative_manifest" ;;
- windows) printf 'Test Linux stub/common coverage; Windows backend not validated: %s\n' "$relative_manifest" ;;
- esac
- run_tests "$manifest"
- ;;
esac
checked_count=$((checked_count + 1))
done <"$manifest_list"
diff --git a/tools/ci/src/ci_workflow.rs b/tools/ci/src/ci_workflow.rs
index 8c74ed01d..fe0c0ab2d 100644
--- a/tools/ci/src/ci_workflow.rs
+++ b/tools/ci/src/ci_workflow.rs
@@ -25,7 +25,6 @@ enum CiStep {
GatewayFmt,
GatewayCompile,
GatewayDialyzer,
- GatewayEunit,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -53,13 +52,7 @@ pub async fn run_ci(args: CiArgs) -> Result<()> {
}
CiStep::Test => {
run_generators(&root, false)?;
- run_app_test_artifact_generators(&root, AppWasm::ReuseIfPresent)?;
run_workspace_tests(&root)?;
- run_command(
- CommandSpec::new("pnpm")
- .args(["--filter", "fluxer_desktop", "test:main"])
- .current_dir(&root),
- )?;
run_command(with_test_env(
CommandSpec::new("pnpm")
.args(["--filter", "fluxer_api", "test"])
@@ -85,9 +78,6 @@ pub async fn run_ci(args: CiArgs) -> Result<()> {
CiStep::GatewayDialyzer => {
run_gateway_step(&root.join("fluxer_gateway"), GatewayStep::Dialyzer, "test")
}
- CiStep::GatewayEunit => {
- run_gateway_step(&root.join("fluxer_gateway"), GatewayStep::Eunit, "test")
- }
}
}
@@ -182,8 +172,6 @@ fn workspace_test_args(concurrency: Option<&str>) -> Vec<OsString> {
"!fluxer_api",
"--filter",
"!fluxer",
- "--filter",
- "!fluxer_desktop",
"--if-present",
"test",
]