From 886da73eb666aec27028a37060b6e66d52670403 Mon Sep 17 00:00:00 2001 From: Ben Stull Date: Wed, 10 Jun 2026 08:41:32 -0700 Subject: [PATCH] ci(slice-1): Gitea workflow runs scripts/check.sh against a Postgres service Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/ci.yml | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 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..4c4a2bc --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,57 @@ +# Server-side pre-merge gate. Calls the same scripts/check.sh that runs locally, so +# the local and server gates can never drift: import-linter (main > domains > +# platform), then backend pytest against a Postgres service, then the frontend +# typecheck + build. Requires a registered Gitea Actions runner advertising the +# `ubuntu-latest` label. +name: ci + +on: + push: + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + services: + postgres: + image: postgres:16 + env: + POSTGRES_USER: ecomm + POSTGRES_PASSWORD: ecomm + POSTGRES_DB: ecomm + ports: + - 5432:5432 + options: >- + --health-cmd "pg_isready -U ecomm" + --health-interval 2s + --health-timeout 3s + --health-retries 30 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install backend deps + run: | + python -m venv .venv + .venv/bin/python -m pip install --upgrade pip + .venv/bin/python -m pip install -r backend/requirements.txt + + - name: Install frontend deps + run: | + cd frontend && npm ci + + - name: Run the pre-merge gate + env: + PYTHON: ${{ github.workspace }}/.venv/bin/python + ECOMM_TEST_ADMIN_URL: postgresql://ecomm:ecomm@localhost:5432/postgres + run: scripts/check.sh