Add CI + auto-release workflows; publish-ready pyproject metadata #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: [main] | |
| # Cancel previous in-progress runs for the same branch to save CI minutes. | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: ${{ matrix.os }} · Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # Don't abort the whole matrix when one cell fails — surfaces all | |
| # OS/version regressions in a single CI run. | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: ["3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Cache pip downloads keyed on requirements files so re-runs | |
| # for the same dep set skip the wheel build. | |
| cache: pip | |
| cache-dependency-path: | | |
| pyproject.toml | |
| requirements.txt | |
| requirements-dev.txt | |
| - name: Install dev extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: ruff lint | |
| run: python -m ruff check . | |
| - name: bandit security scan | |
| # The -c flag is mandatory — without it bandit ignores the | |
| # project's per-rule skip configuration in pyproject.toml. | |
| run: python -m bandit -c pyproject.toml -r autopapertoppt/ sources/ | |
| - name: pytest | |
| # Hermetic fixtures only — no live HTTP. -X utf8 keeps Windows | |
| # console codec out of the picture for paper titles containing | |
| # accented or CJK characters. | |
| run: python -X utf8 -m pytest tests/ -q |