Repository navigation
ci: split CI into one workflow per product and keep only repo-wide checks shared - #1917
Conversation
… on pull requests
…pull requests with Node 24 and the latest actions
…workflows read it
…n and test itself code-quality.yml ran every pre-commit hook minus a skip list in each job, so newer hooks leaked in: check-docs ran four times per PR, the translation hooks ran in every job, and Biome ran on every PR whether the web app changed or not. The desktop backend had no security scan at all, the gates counted a cancelled or timed-out job as passing, and hooks pinned tool versions a second time. - code-quality.yml keeps only what belongs to no product, run by hook name on every PR: file checks, check-docs and detect-secrets - docker-tests.yml replaces backend-tests.yml and e2e-tests.yml for surfsense_backend and surfsense_web: ruff, bandit, Biome, backend unit and integration tests, and the e2e journey, each job run only when its files change - desktop-tests.yml filters per job instead of per workflow, adds bandit for the desktop backend, and checks translations, failing on a stale en.json that typecheck used to regenerate silently - each workflow ends in a gate (Docker Gate, Desktop Gate, Quality Gate) that always reports and fails on failed or cancelled jobs, so it can be made a required check without blocking PRs that don't touch that product - bandit is split into bandit-docker and bandit-desktop aliases, so each product scans only its own code - the Biome hook runs only when a commit touches surfsense_web, instead of blocking every commit on the app's existing formatting errors - Biome and formatjs run from each app's own install (pnpm exec, and a new translations:verify script), so their versions live only in package.json - hook versions updated: pre-commit-hooks v6.0.0, bandit 1.9.4, commitizen v4.19.0, and ruff v0.15.8 to match surfsense_backend's own ruff - surfsense_web's pnpm comes from its own package.json and the root package.json is removed; every action is on its latest version - CONTRIBUTING.md, docs/contracts/README.md, auth_mint.py, the translate skill and localization.md name the new workflows and commands
|
@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
desktop-tests.ymlforsurfsense_local: the desktop backend (ruff, bandit, unit and integration tests), frontend (translation checks, typecheck, lint, tests) and Electron (typecheck, tests), each job run only when its own files change. Before this, no workflow ran the desktop tests.docker-tests.ymlforsurfsense_backendandsurfsense_web, replacingbackend-tests.ymlande2e-tests.yml: backend lint (ruff, bandit), web lint (Biome), backend unit and integration tests, and the e2e journey, each run only when its files change.code-quality.ymlnow keeps only the checks that belong to no product, run on every PR: YAML/JSON/TOML, merge conflicts, large files, debug statements, case conflicts,check-docsanddetect-secrets. Its jobs used to run every hook minus a skip list, so newer hooks leaked in:check-docsran four times per PR, and Biome ran on every PR whether the web app changed or not.banditis split intobandit-dockerandbandit-desktopaliases, so each product scans only its own code. The desktop backend had no security scan before.en.jsonthat doesn't match the code. Before, typecheck regenerated it silently and CI passed.11.27.1insurfsense_local/frontendandsurfsense_local/electron. The desktop workflows andrelease-local.ymlread it from those files,surfsense_webkeeps its own pnpm10.26.0, and the rootpackage.jsonis removed.surfsense_web.pnpm exec, and a newtranslations:verifyscript), so their versions live only inpackage.json.pre-commit-hooksv6.0.0,bandit1.9.4,commitizenv4.19.0, andruffv0.15.8 to matchsurfsense_backend's own ruff.CONTRIBUTING.md,ROADMAP.md,localization.md,packaging.md,docs/contracts/README.mdand the translate skill describe the new workflows and commands.surfsense_webhas 10 existing Biome formatting errors, so Web Lint will fail on web PRs until they are fixed.surfsense_backendhas 4 existing banditB324findings, which fail a PR only if it touches one of those files.devormaintoday. To block failing PRs from merging, add Docker Gate, Desktop Gate and Quality Gate as required checks in the repository settings.Why
Fixes #
How to test
High-level PR Summary
This PR consolidates continuous integration for the desktop application (
surfsense_local) by creatingdesktop-tests.yml, which runs backend (Python), frontend (TypeScript) and Electron tests in separate jobs triggered only when relevant files change. The workflow mirrorsdocker-tests.yml's new structure, which now tests the Docker product (surfsense_backendandsurfsense_web) with similar path filtering and separation of linting, unit tests, integration tests and end-to-end journeys.code-quality.ymlbecomes a cross-product workflow that handles only file hygiene, docs and secrets scanning, delegating all product-specific linting and testing to the product workflows. Pre-commit hooks and documentation are updated to reflect that each product now manages its own testing pipeline, and pnpm version pinning is centralized in each product'spackage.json.⏱️ Estimated Review Time: 15-30 minutes
💡 Review Order Suggestion
.github/workflows/code-quality.yml.github/workflows/backend-tests.yml.github/workflows/e2e-tests.yml.github/workflows/docker-tests.yml.github/workflows/desktop-tests.yml.pre-commit-config.yaml.github/workflows/release-local.ymlCONTRIBUTING.mddocs/ROADMAP.mddocs/architecture/localization.mddocs/architecture/packaging.mddocs/contracts/README.mdpackage.jsonsurfsense_local/electron/package.jsonsurfsense_local/frontend/package.jsonsurfsense_backend/tests/e2e/auth_mint.py.agents/skills/translate/SKILL.md