Problem
No CI/CD pipeline exists. PRs are not tested, linted, or validated before merge.
Solution
Create .github/workflows/ci.yml:
name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install ruff
- run: ruff check zlm/
- run: ruff format --check zlm/
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install poetry && poetry install
- run: poetry run pytest tests/ -v --tb=short
type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install poetry && poetry install
- run: poetry run mypy zlm/ --ignore-missing-imports
Files
.github/workflows/ci.yml (new)
pyproject.toml (add ruff, mypy dev deps)
Problem
No CI/CD pipeline exists. PRs are not tested, linted, or validated before merge.
Solution
Create
.github/workflows/ci.yml:Files
.github/workflows/ci.yml(new)pyproject.toml(add ruff, mypy dev deps)