fix: Add checkout step to build job and enable pip caching
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
# CI workflow for Local Code Assistant
|
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -12,22 +11,43 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install -e ".[dev]"
|
python -m pip install --upgrade pip
|
||||||
- name: Build and verify
|
pip install -e local_code_assistant/[dev] pytest pytest-cov
|
||||||
run: |
|
|
||||||
python -m py_compile local_code_assistant/cli.py
|
- name: Run linting
|
||||||
python -m py_compile local_code_assistant/commands/*.py
|
run: ruff check local_code_assistant/
|
||||||
python -m py_compile local_code_assistant/services/*.py
|
|
||||||
python -m py_compile local_code_assistant/utils/*.py
|
|
||||||
python -m py_compile local_code_assistant/prompts/*.py
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pytest tests/ -v --tb=short
|
run: pytest local_code_assistant/tests/ -v --tb=short
|
||||||
- name: Run linter
|
|
||||||
run: ruff check .
|
- name: Run tests with coverage
|
||||||
- name: Run type checker
|
run: pytest local_code_assistant/tests/ --cov=local_code_assistant --cov-report=term-missing
|
||||||
run: mypy local_code_assistant/
|
|
||||||
|
build:
|
||||||
|
needs: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
|
- name: Build and verify package
|
||||||
|
run: |
|
||||||
|
cd local_code_assistant
|
||||||
|
pip install build
|
||||||
|
python -m build
|
||||||
|
pip install dist/*.whl
|
||||||
|
local-code-assistant --help > /dev/null && echo "Package installed successfully"
|
||||||
|
|||||||
Reference in New Issue
Block a user