Skip to content

ci: auto-publish to PyPI via OIDC trusted publishing #70

ci: auto-publish to PyPI via OIDC trusted publishing

ci: auto-publish to PyPI via OIDC trusted publishing #70

Workflow file for this run

name: Quality Gates
on:
workflow_dispatch:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pytest
- name: Compile Python Sources
run: |
python -W error::SyntaxWarning -m compileall -q engine tests
- name: Block Deprecated Gemini Imports
shell: bash
run: |
set -euo pipefail
legacy_imports="$(git grep -nE '^[[:space:]]*(import[[:space:]]+google\.generativeai|from[[:space:]]+google\.generativeai)' -- engine tests || true)"
if [[ -n "$legacy_imports" ]]; then
echo "Deprecated google.generativeai imports found:"
echo "$legacy_imports"
exit 1
fi
- name: Block Deprecated Gemini Dependency Pin
shell: bash
run: |
set -euo pipefail
legacy_pins="$(git grep -n 'google-generativeai' -- requirements.txt engine/requirements.txt engine/pyproject.toml engine/opendraft.egg-info/requires.txt engine/opendraft.egg-info/PKG-INFO || true)"
if [[ -n "$legacy_pins" ]]; then
echo "Deprecated google-generativeai pins found:"
echo "$legacy_pins"
exit 1
fi
- name: Run Test Suite
run: |
python -m pytest tests -q