Introducing a new way to review your PRs.

Read the announcement

ismaelmartinez / teams-for-linux

Unofficial Microsoft Teams for Linux client

View on GitHub

23 documents · Updated Nov 23, 2026

docs / release-packaging-and-quality

Release packaging and quality automation

The release system turns a versioned Electron application into installable packages for Linux, macOS, and Windows. Automated checks validate source behavior, desktop launch, package contents, and distribution environments before a maintainer publishes the release. The application updates and packaging page covers packaging and update mechanics. The automated test coverage page covers the test suites and their product contracts.

Release flow

The release flow links merged source changes to a versioned release and then to platform artifacts. Release automation prepares the version and release notes. Quality jobs run before platform jobs build the artifacts. A maintainer publishes the release only after the checks pass.

The main stages are:

  1. Release automation prepares the version and release files.
  2. Quality jobs check source rules, generated configuration data, dependencies, release metadata, and app behavior.
  3. Platform jobs package the app for supported operating systems and CPU types.
  4. Published releases trigger store and distribution smoke checks.

This diagram shows how a source change moves from validation to public distribution.

flowchart LR
    A[Change merged to main] --> B[Release preparation]
    B --> C[Quality checks]
    C --> D[Platform packages]
    D --> E[Draft release assets]
    E --> F[Maintainer publishes release]
    F --> G[Store and distribution checks]

References: .github/…/release-please.yml• L1-24 .github/…/release-please.yml• L29-121 .github/…/build.yml• L1-20 .github/…/snap-release.yml• L1-5 .github/…/flatpak-smoke.yml• L15-22

Platform packages

The packaging system uses Electron Builder to create distribution files from one Electron application. Each platform uses a matching build environment so the package can include the platform's desktop entry, launch rules, and native dependencies.

PlatformMain outputsDistribution path
Linux.deb, .rpm, .tar.gz, and AppImageGitHub release assets; Snap builds also go to the Snap Store
macOS.dmg and .zip for x64 and arm64GitHub release assets
Windowsx64 .exeGitHub release assets
FlatpakA smoke-built Flatpak from the released Linux packageFlathub packaging validation

Linux packaging covers x64, arm64, and armv7l. macOS builds both supported CPU types. Snap uses separate architecture jobs because its build environment differs from the regular package build. The AppImage build uses Electron Builder toolset 1.0.3, which provides a static runtime that avoids a libfuse.so.2 dependency on newer Linux distributions. The AppImage still needs FUSE and fusermount(3) to run. The Snap package also carries the client PipeWire files that support screen capture in its confined runtime; its environment points Chromium to those bundled files.

References: package.json• L37-52 package.json• L78-212 .github/…/build.yml• L120-405 .github/…/snap.yml• L17-207 tests/…/snapPipewireBundle.test.js• L24-31 tests/…/snapPipewireBundle.test.js• L57-131

Release metadata

Release metadata keeps the app version, lock file, Linux appdata entry, and release notes aligned. Packaging uses this shared version set to create release information and stops when the values do not agree.

The release preparation workflow updates the generated release files with the draft release. Package builders then consume the same version and note data as the release record.

The package manifest declares the approved lint tool range and the AppImage toolset used by Electron Builder. The lock file records the exact dependency graph for repeatable quality checks. The AppImage toolset is part of the packaging contract because it controls the runtime used by the Linux artifact.

References: scripts/generateReleaseInfo.js• L14-115 scripts/afterpack.js• L25-73 .github/…/release-please.yml• L72-121 package.json• L1-3 package.json• L64-73 package.json• L95-103 package-lock.json• L1-32 package-lock.json• L2755-2805

Store delivery

Store delivery is separate from the normal GitHub release asset build. Snap can build edge packages from main, while a published release builds the tagged source for candidate delivery. Flatpak validation uses the released Linux package and metadata to test the Flathub build path.

This separation checks the package users will receive without turning a smoke build into a second release artifact.

References: .github/…/snap.yml• L18-77 .github/…/snap-release.yml• L14-149 .github/…/flatpak-smoke.yml• L97-189

Quality gates

Quality automation checks different risks at different points in the release path. Fast source checks run before platform packaging. Electron tests cover desktop behavior. Distribution checks cover package and host-environment failures that source tests cannot detect.

GateMain questionWhen it runs
Lint and dependency auditIs the source valid and are critical dependency risks absent?Pushes, pull requests, and manual runs
Generated configuration checkDo committed configuration docs match the app rules?Build workflow lint job
Unit testsDo isolated app rules and services keep their expected behavior?Build workflow test job
Unauthenticated Electron testsCan the app start and reach the Microsoft sign-in boundary?Build workflow test job
Authenticated Electron testsCan a logged-in app reach a usable Teams state?Manual or session-backed runs
Packaged-app smoke launchDoes the Linux package start with the files it needs?Linux x64 packaging job
Cross-distro smoke testsCan the Linux app start across distro and display combinations?Main pushes and manual runs
Flatpak smoke buildCan Flathub build the released Linux package with its metadata?Published releases and manual runs

The layered gates reduce cost and narrow failure causes. Unit tests catch local rule changes early. Desktop tests catch Electron boundary failures. Package and distribution checks catch missing files, native dependency issues, CPU differences, and display-server problems.

References: .github/…/build.yml• L20-119 .github/…/build.yml• L120-178 .github/…/cross-distro-smoke.yml• L1-117 .github/…/flatpak-smoke.yml• L35-189 package.json• L21-52

Unit tests

Unit tests protect app rules and services without starting Microsoft Teams. The suite runs with Node's test runner and covers configuration loading, option migration, connection timing, notifications, profiles, screen sharing, platform services, desktop state, and theme selection.

The configuration tests check the full startup contract. They verify that nested settings keep their defaults, renamed settings preserve source precedence, deprecated flat settings produce stable warnings, Chromium switch aliases remain separate from the app's deprecated spellings, and nested command-line or environment settings reach the app's flat runtime keys. The startup-level test drives the real loader so warning aggregation, explicit-setting detection, and source precedence are checked together.

The service tests also protect cross-process boundaries. They check Graph calendar paging and host validation, IPC channel allowlists and sender rules, preload isolation, notification delivery, profile activation, and per-profile notification flags. These checks make sure a release keeps both the user-facing desktop flow and the security rules that constrain Electron communication.

The connection timing tests protect useful release diagnostics. A successful initial Teams load logs its duration. A failed load reports its elapsed time and schedules a retry. A redirect is treated as a completed hand-off rather than a failed load that should be retried.

Theme selection tests protect the user configuration boundary. They verify persistence across restart, preservation of unrelated settings, safe atomic writes, recovery after write failure, and correct menu state. The flow tests also verify the restart prompt and the distinction between a requested config watcher and one that is active.

References: package.json• L21-31 tests/…/configDeprecationWarning.test.js• L39-273 tests/…/configRenames.test.js• L31-669 tests/…/configStartupDeprecation.test.js• L70-227 tests/…/graphApiCalendarPaging.test.js• L25-67 tests/…/ipcValidator.test.js• L36-227 tests/…/preloadIpcLeak.test.js• L17-118 tests/…/notificationService.test.js• L272-492 tests/…/profileActivation.test.js• L32-77 tests/…/profileNotificationFlags.test.js• L19-57 tests/…/profileNotifications.test.js• L43-112 tests/…/snapPipewireBundle.test.js• L57-131 tests/…/connectionManagerLoadTiming.test.js• L58-148 tests/…/themeSelection.test.js• L87-291 tests/…/themeSelectionFlow.test.js• L157-328

Electron end-to-end tests

Electron end-to-end tests start the desktop app and inspect its windows and pages through Playwright. The normal suite uses a clean temporary profile, which validates the public launch path without requiring Microsoft authentication.

The notification suite checks the renderer-facing notification contract for all supported notification methods. It verifies lifecycle methods, event callbacks, repeated notification creation, native notification compatibility, and forwarding of the sender name from options.title rather than the page title.

The multi-account suite checks the enabled feature from startup through profile switching. It covers the empty-profile login path, the switcher surface, profile pin limits, view ordering, background unread badges, per-profile notification flags, draft preservation in the manage dialog, and notification clicks that return the user to the profile that raised them.

Other Electron tests cover custom theme persistence, screen-source selection, and the authenticated Teams path. The authenticated suite uses an external session directory and remains separate from the normal unauthenticated CI gate because Microsoft login and the Teams web UI are external dependencies.

References: playwright.config.js• L1-15 playwright.authenticated.config.js• L1-26 tests/…/electronApp.js• L41-202 tests/…/notifications.spec.js• L21-69 tests/…/notifications.spec.js• L126-305 tests/…/multi-account-enabled.spec.js• L18-95 tests/…/multi-account-enabled.spec.js• L97-231 tests/…/multi-account-enabled.spec.js• L233-430 tests/…/multi-account-enabled.spec.js• L432-550 tests/…/screen-sharing-picker.spec.js• L5-91 tests/…/customThemes.spec.js• L8-190 tests/…/app-ready.spec.js• L1-43

Distribution tests

Distribution tests validate the boundary between a released artifact and a Linux desktop environment. The cross-distro workflow runs the x64 AppImage in Docker across Ubuntu, Fedora, and Debian with X11, Wayland, and XWayland. This creates nine environment combinations.

The smoke check does not require login. It confirms that the packaged main process launches and continues to produce healthy startup activity. The packaged Linux job also checks the unpacked release build for missing modules and successful Teams navigation. Flatpak validation checks that the released package and metadata produce an executable, desktop entry, and metainfo. Snap bundle tests add a local check that pinned x64 PipeWire packages have valid checksums, install the required client files in the expected locations, skip unsupported architectures without network or output side effects, and match the Snap environment paths.

The AppImage runtime change reduces one host dependency in this matrix. Newer distributions do not need libfuse.so.2 for the packaged runtime, but the smoke environment must still provide FUSE and fusermount(3) for AppImage execution.

References: package.json• L95-103 .github/…/build.yml• L154-178 .github/…/cross-distro-smoke.yml• L11-117 tests/…/README.md• L27-39 tests/…/run-all-tests.sh• L1-84 tests/…/smoke-check.sh• L1-127 .github/…/flatpak-smoke.yml• L115-189 tests/…/snapPipewireBundle.test.js• L57-131

Change checklist

When these files or sections are changed, remember to consider these:

  • When package targets or CPU types change in package.json, update the matching build jobs and artifact paths in .github/…/build.yml.
  • When the AppImage toolset changes, verify the supported host dependencies and keep the cross-distro smoke environment aligned with the runtime requirements.
  • When the release version or appdata format changes, keep package.json, package-lock.json, and the appdata entry valid for release metadata generation.
  • When generated configuration options or rename rules change, keep generated docs, schema checks, migration behavior, and startup warning tests aligned.
  • When a test script or test entry point changes in package.json, keep the unit and Electron workflow jobs pointed at the intended suites.
  • When the lint tool version changes in package.json, update package-lock.json and confirm the lint workflow uses the intended reproducible dependency graph.
  • When IPC channels, sender rules, or preload event handling change, update the allowlist and preserve the source checks that prevent renderer access to ipcRenderer.
  • When notification or profile activation behavior changes, keep native and custom notification clicks tied to the renderer that raised them. Preserve per-profile flag pull and push behavior.
  • When Graph calendar paging changes, preserve same-host next links, the page cap, and the existing error shape.
  • When Snap PipeWire bundle inputs or paths change, update pinned package data, checksum checks, install locations, and the Snap environment together.
  • When Linux package names or release metadata change, review the Flatpak smoke workflow because it downloads the released package by name.
  • When packaged file contents or startup logs change, review the Linux package smoke checks and cross-distro smoke thresholds.
  • When authenticated test session handling changes, keep session data outside source control and preserve the E2E_SESSION_DIR contract.

Important failure modes

TriggerConsequenceGuard
Package version and lock file disagreeRelease metadata generation or packaging stopsRelease preparation and metadata checks compare the shared version sources
The AppImage runtime requires an unavailable host libraryThe AppImage fails before the app starts on a supported Linux distributionElectron Builder uses the static AppImage toolset and distribution smoke tests exercise the artifact
FUSE or fusermount(3) is absentThe AppImage cannot mount and launch even though it does not need libfuse.so.2Cross-distro environments must provide the remaining AppImage runtime requirements
A deprecated option warning includes values or changes orderUsers see unstable or unsafe migration promptsUnit and startup tests require stable sorted text without configured values
Nested configuration values lose source precedenceFlags or environment settings can be silently replaced by file defaultsLoader and rename tests cover source order and nested-over-flat behavior
A notification override omits lifecycle methods or forwards the page titleTeams can stop handling later notifications or show the wrong senderElectron tests cover lifecycle shape and sender-title forwarding for each method
A notification click is not tied to its raising profileThe app shows the window but leaves the user in the wrong accountProfile activation and multi-account notification tests use the sender renderer as the source of truth
A Graph next link leaves the Microsoft Graph host or paging never endsCalendar data can be requested from an unexpected host or the client can make excessive requestsCalendar paging tests enforce same-host links and a page cap
An IPC channel is not allowlisted or a page can receive the raw IPC eventA valid feature fails at runtime or page script gains access to privileged Electron stateSource scans and preload isolation tests check registration, sender rules, and callback shape
A failed initial page load is treated as a redirectA deep link can be reloaded and lostConnection timing tests require redirects to avoid retry scheduling
Theme selection writes only part of the config or leaves a false menu checkmarkUser settings can be lost or the menu can show an inactive themeAtomic-write and menu-flow tests require rollback and state restoration
The packaged Linux app omits a loaded module or fails to finish Teams navigationA release can build but fail at first launchLinux packaging runs a packaged-app smoke launch
The released AppImage fails in one distro or display serverUsers can receive a package that fails only in one Linux setupThe cross-distro matrix covers three distros and three display modes
Snap PipeWire files or checksums do not match the expected bundleScreen capture can fall back to the wrong path or the Snap build can ship incomplete native filesBundle tests verify pinned x64 downloads, checksums, layout, and environment paths
Flatpak metadata no longer matches the released packageA Flathub update can fail after the GitHub release succeedsPublished-release smoke builds check the executable, desktop entry, and metainfo
Authenticated tests use missing or tracked session dataTests fail before launch or expose live Microsoft tokensThe authenticated config requires external E2E_SESSION_DIR data

Key files

FileWhy to read it
package.jsonDefines release scripts, Electron Builder targets, platform outputs, AppImage runtime toolset, Snap runtime paths, and test entry points.
package-lock.jsonKeeps the release version, exact dependency graph, and resolved lint tool version aligned with package.json.
.github/…/build.ymlShows quality gates, packaged Linux smoke launch, and platform build flow.
.github/…/release-please.ymlShows how merged changes become draft release updates and generated release files.
.github/…/cross-distro-smoke.ymlShows the Linux distribution and display-server matrix.
.github/…/flatpak-smoke.ymlShows validation of a released package against the Flathub build path.
scripts/generateReleaseInfo.jsDefines version and release-note checks used by packaging.
scripts/afterpack.jsDefines the final package preparation step shared by platform builds.
scripts/bundleSnapPipewire.jsShows the native PipeWire bundle contract for Snap screen capture.
tests/…/configStartupDeprecation.test.jsShows the real startup configuration and deprecation-warning contract.
tests/…/configRenames.test.jsShows precedence, migration, and compatibility checks for configuration names.
tests/…/ipcValidator.test.jsShows the IPC allowlist, sender boundaries, and completeness checks.
tests/…/notificationService.test.jsShows native notification delivery, profile activation, relay, and lifetime coverage.
tests/…/profileNotifications.test.jsShows how notification flags stay scoped to the owning profile's renderers.
tests/…/multi-account-enabled.spec.jsShows the enabled multi-account flow from startup through profile and notification behavior.
tests/…/smoke-check.shShows the Linux package startup signal used in distribution smoke tests.