886da73eb6
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
# 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
|