Skip to content

CI/CD Overview

Relate Mail uses GitHub Actions for continuous integration and continuous delivery. The CI system is designed around two principles: build only what changed (path-filtered pipelines) and security first (secret scanning, vulnerability analysis, and supply chain verification on every run).

Workflows

Six workflow files live in .github/workflows/:

WorkflowFilePurpose
CIci.ymlPrimary build, lint, and test pipeline for all components
Docker Publishdocker-publish.ymlBuild and push multi-platform Docker images to GHCR
Mobile Buildmobile-build.ymlBuild mobile apps via Expo EAS
Desktop Builddesktop-build.ymlBuild desktop apps for Windows, macOS, and Linux
CodeQLcodeql.ymlStatic analysis for C# and JavaScript/TypeScript
OpenSSF Scorecardscorecard.ymlSupply chain security assessment

Trigger Summary

EventCIDocker PublishMobile BuildDesktop BuildCodeQLScorecard
Push to mainYesYesYesYesYesYes
Pull requestYes--YesYesYes--
Version tag (v*)--Yes--------
Manual dispatchYesYesYesYesYesYes
Weekly schedule--------YesYes

Path Filtering

The CI workflow uses dorny/paths-filter to detect which parts of the monorepo have changed. Jobs only run when their relevant paths are modified:

FilterPathsJobs Triggered
backendapi/**Backend build, unit tests, integration tests, E2E tests
webweb/**, packages/shared/**Web lint/build, web unit tests, web E2E tests
mobilemobile/**Mobile lint/typecheck, mobile unit tests
desktopdesktop/**, packages/shared/**Desktop lint/typecheck, Rust clippy
dockerapi/**, web/**, docker/**Docker build validation
sharedpackages/shared/**Triggers web and desktop rebuilds

This approach keeps CI fast -- a change to only the mobile app does not trigger backend tests or Docker builds.

Security Scanning

Security is integrated at multiple levels:

  • TruffleHog -- Scans every PR for accidentally committed secrets (verified secrets only to minimize false positives)
  • Trivy -- Scans Docker images for known vulnerabilities (CRITICAL and HIGH severity) during the publish workflow
  • CodeQL -- Weekly static analysis of C# and JavaScript/TypeScript code for security vulnerabilities and code quality issues
  • OpenSSF Scorecard -- Weekly assessment of supply chain security practices (dependency pinning, branch protection, signed releases, etc.)

See Security Scanning for details on each tool.

Permissions

All workflows use permissions: read-all as their default, following the principle of least privilege. Individual jobs that need write access (e.g., publishing Docker images, uploading SARIF results) explicitly declare the specific permissions they require.

Artifacts

Several jobs upload artifacts for debugging and reporting:

ArtifactWorkflowContents
unit-test-resultsCI.trx test results file
integration-test-resultsCI.trx test results file
e2e-test-resultsCI.trx test results file
web-coverage-reportCIHTML/JSON coverage report
web-e2e-resultsCIPlaywright HTML report
mobile-coverage-reportCIJest coverage report
desktop-windows-msiDesktop BuildWindows MSI installer
desktop-windows-nsisDesktop BuildWindows NSIS installer
desktop-macos-dmgDesktop BuildmacOS DMG image
desktop-linux-appimageDesktop BuildLinux AppImage
desktop-linux-debDesktop BuildLinux .deb package

Released under the MIT License.