Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

ci: stop validating the same commit twice

Juan Denis44f5a328679b
diff --git a/.github/workflows/extensions-ci.yml b/.github/workflows/extensions-ci.yml
index 2b468270..1415c81f 100644
--- a/.github/workflows/extensions-ci.yml
+++ b/.github/workflows/extensions-ci.yml
@@ -8,14 +8,14 @@ name: Extensions CI
on:
push:
- branches: [dev, main]
+ branches: [dev]
paths:
- 'builtin-extensions/**'
- 'frontend/src/plugins/**'
- 'scripts/sync-builtin-frontends.mjs'
- '.github/workflows/extensions-ci.yml'
pull_request:
- branches: [dev, main]
+ branches: [main]
paths:
- 'builtin-extensions/**'
- 'frontend/src/plugins/**'
diff --git a/.github/workflows/release-smoke.yml b/.github/workflows/release-smoke.yml
index b2a35cfb..b47ef848 100644
--- a/.github/workflows/release-smoke.yml
+++ b/.github/workflows/release-smoke.yml
@@ -5,9 +5,12 @@ name: Release Build Smoke Test
# frontend source files) before they reach main, instead of failing late in the
# release workflow.
+# main is deliberately absent from `push`: on a merge to main, release.yml's
+# `build-release` job runs this very script for real moments later, so building
+# the tarball here too was pure duplication.
on:
push:
- branches: [dev, main]
+ branches: [dev]
paths:
- 'frontend/**'
- 'backend/**'
@@ -16,7 +19,7 @@ on:
- '.github/workflows/release.yml'
- 'VERSION'
pull_request:
- branches: [dev, main]
+ branches: [main]
paths:
- 'frontend/**'
- 'backend/**'
diff --git a/.github/workflows/scripts-ci.yml b/.github/workflows/scripts-ci.yml
index 24df61c2..4fe0dcd1 100644
--- a/.github/workflows/scripts-ci.yml
+++ b/.github/workflows/scripts-ci.yml
@@ -14,7 +14,7 @@ name: Scripts CI
on:
push:
- branches: [dev, main]
+ branches: [dev]
paths:
- 'scripts/**'
- 'templates/**'
@@ -23,7 +23,7 @@ on:
- 'serverkit'
- '.github/workflows/scripts-ci.yml'
pull_request:
- branches: [dev, main]
+ branches: [main]
paths:
- 'scripts/**'
- 'templates/**'
diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml
index f565c33d..1861401c 100644
--- a/.github/workflows/security-scan.yml
+++ b/.github/workflows/security-scan.yml
@@ -7,7 +7,7 @@ on:
- 'backend/**'
- '.github/workflows/security-scan.yml'
pull_request:
- branches: [main, dev]
+ branches: [main]
paths:
- 'backend/**'
- '.github/workflows/security-scan.yml'
diff --git a/.github/workflows/test-system-utils.yml b/.github/workflows/test-system-utils.yml
index 8dae39e2..35e02ba9 100644
--- a/.github/workflows/test-system-utils.yml
+++ b/.github/workflows/test-system-utils.yml
@@ -9,36 +9,21 @@ on:
- 'backend/tests/test_utils_system*.py'
- '.github/workflows/test-system-utils.yml'
pull_request:
- branches: [main, dev]
+ branches: [main]
paths:
- 'backend/app/utils/system.py'
- 'backend/app/services/**'
- 'backend/tests/test_utils_system*.py'
+# The mocked `unit-tests` job that used to lead this file was removed: it ran
+# `pytest tests/test_utils_system.py` (44 tests), and Backend CI's bare
+# `pytest -v` already collects that exact file — there is no pytest.ini,
+# addopts, or collect_ignore narrowing it. What is left here is the part
+# Backend CI genuinely cannot do: exercise the package-manager detection
+# against real apt/dnf inside real distro images.
jobs:
# ──────────────────────────────────────────────────────────────────
- # Job 1: Mocked unit tests — fast, validates all logic
- # ──────────────────────────────────────────────────────────────────
- unit-tests:
- name: Unit Tests
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
-
- - uses: actions/setup-python@v5
- with:
- python-version: '3.11'
-
- - name: Install test deps
- run: pip install pytest
-
- - name: Run unit tests
- working-directory: backend
- run: python -m pytest tests/test_utils_system.py -v
-
- # ──────────────────────────────────────────────────────────────────
- # Job 2: Integration tests on real distros (no mocks)
+ # Job 1: Integration tests on real distros (no mocks)
# ──────────────────────────────────────────────────────────────────
integration-tests:
name: Integration (${{ matrix.distro }})
@@ -91,7 +76,7 @@ jobs:
run: python3 -m pytest tests/test_utils_system_integration.py -v
# ──────────────────────────────────────────────────────────────────
- # Job 3: Audit — grep for raw subprocess patterns in services
+ # Job 2: Audit — grep for raw subprocess patterns in services
# ──────────────────────────────────────────────────────────────────
audit-raw-patterns:
name: Audit Raw Subprocess Patterns