fix: resolve CI/CD issues - Poetry setup, type annotations, MyPy errors
This commit is contained in:
@@ -17,24 +17,28 @@ jobs:
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
installer-parallel: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e ".[dev]"
|
||||
poetry install --with dev
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
pytest tests/ -v
|
||||
poetry run pytest tests/ -v
|
||||
|
||||
- name: Run linting
|
||||
run: |
|
||||
pip install ruff
|
||||
ruff check .
|
||||
poetry run ruff check .
|
||||
|
||||
- name: Run type checking
|
||||
run: |
|
||||
pip install mypy
|
||||
mypy codechunk
|
||||
poetry run mypy codechunk
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -47,14 +51,17 @@ jobs:
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
pip install build
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
installer-parallel: true
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
python -m build
|
||||
poetry build
|
||||
|
||||
- name: Verify build
|
||||
run: |
|
||||
pip install dist/*.whl --dry-run
|
||||
poetry run pip install dist/*.whl --dry-run
|
||||
|
||||
Reference in New Issue
Block a user