colmi_r02_client/.github/workflows/ci.yml
Wesley Ellis 19e70aa502
Some checks failed
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.13) (push) Has been cancelled
feat: add GitHub Actions CI workflow (#55)
* feat: add GitHub Actions CI workflow

Add CI workflow that runs on pushes and pull requests to main branch.
Tests against Python 3.11, 3.12, and 3.13 using the existing check.sh script.

The workflow:
- Sets up Python environment
- Installs Poetry and dependencies
- Uses caching for faster builds
- Runs check.sh which includes: ruff format, ruff check, mypy, pytest, and poetry check

* fix: run check.sh with poetry to access dev dependencies

The check.sh script needs to run within the Poetry virtual environment
to have access to dev dependencies like ruff, mypy, and pytest.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-25 00:56:30 -05:00

49 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
- name: Make check.sh executable
run: chmod +x check.sh
- name: Run checks
run: poetry run ./check.sh