From de8cbfec23d5be2c28da3cdb7e48a26301edffee Mon Sep 17 00:00:00 2001 From: mohammad Date: Mon, 2 Mar 2026 21:10:22 +0300 Subject: [PATCH] Add Gitea Actions CI baseline --- .gitea/workflows/ci.yml | 58 +++++++++++++++++++++++++++++++++++++++++ README.md | 1 + docs/risks.md | 1 + 3 files changed, 60 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..3ff60b4 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,58 @@ +name: CI + +on: + push: + pull_request: + +jobs: + backend-tests: + name: Backend tests + runs-on: ubuntu-latest + env: + DJANGO_SECRET_KEY: ci-test-key + DJANGO_DEBUG: "0" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "pip" + cache-dependency-path: | + backend/requirements.txt + backend/requirements-dev.txt + + - name: Install backend dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r backend/requirements.txt -r backend/requirements-dev.txt + + - name: Run backend tests + working-directory: backend + run: python -m pytest + + frontend-tests: + name: Frontend tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "npm" + cache-dependency-path: frontend/package-lock.json + + - name: Install frontend dependencies + working-directory: frontend + run: npm ci + + - name: Run frontend tests + working-directory: frontend + env: + CI: "true" + run: npm run test -- --run diff --git a/README.md b/README.md index 3c78ac0..b1606bb 100644 --- a/README.md +++ b/README.md @@ -65,3 +65,4 @@ The dev server proxies `/api` to `http://localhost:8000`. - Known gaps and risks: `docs/risks.md` - Architecture and async/observability decisions: `docs/architecture.md` - Documentation index and standards: `docs/README.md` and `docs/documentation.md` +- CI: Gitea Actions workflow in `.gitea/workflows/ci.yml` diff --git a/docs/risks.md b/docs/risks.md index 3661198..d760bd3 100644 --- a/docs/risks.md +++ b/docs/risks.md @@ -29,3 +29,4 @@ This file tracks known gaps and risks to address in future iterations. - No audit logs for admin actions. - No multi-tenant isolation or data export tooling. - No GDPR/PDPL data retention policies defined. +- CI baseline exists, but needs Gitea runner registration and required-check enforcement.