Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,45 @@ on:
branches: [ main ]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry' # Cache Poetry dependencies
- name: Install dependencies
run: |
poetry sync --no-root
- name: Run linters
run: |
poetry run make lint

test:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version: ["3.13"]

steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry' # Cache Poetry dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
run: poetry sync
- name: Run tests and check coverage
run: |
poetry run pytest ./tests --cov=python_chat --cov=./tests --cov-report term-missing --cov-fail-under=85
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ PYTHON_VERSION ?= 3.13
$(VENV)/bin/python -m pip install poetry

.install-deps:
$(VENV)/bin/poetry install
poetry run poetry install

.install-pre-commit:
$(VENV)/bin/poetry run pre-commit install
poetry run pre-commit install

init:
@echo "Creating virtual environment..."
Expand All @@ -32,20 +32,20 @@ clean:
rm -rf *.egg-info

pretty:
$(VENV)/bin/ruff check --fix-only .
$(VENV)/bin/ruff format .
poetry run ruff check --fix-only .
poetry run ruff format .

ruff-lint:
$(VENV)/bin/ruff check .
poetry run ruff check .

mypy:
$(VENV)/bin/mypy --install-types --non-interactive .
poetry run mypy --install-types --non-interactive .


lint: ruff-lint mypy

test:
$(VENV)/bin/pytest ./tests
poetry run pytest ./tests

test-cov:
$(VENV)/bin/pytest ./tests --cov=python_chat --cov=./tests --cov-report term-missing --cov-fail-under=85
poetry run pytest ./tests --cov=python_chat --cov=./tests --cov-report term-missing --cov-fail-under=85
Loading