fix: combine CI build and verify steps for persistent shell context
Some checks failed
CI / test (push) Failing after 5s
Some checks failed
CI / test (push) Failing after 5s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# CI workflow for Local Code Assistant
|
||||
name: CI
|
||||
|
||||
on:
|
||||
@@ -11,46 +12,22 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e local_code_assistant/[dev] pytest pytest-cov
|
||||
|
||||
- name: Run linting
|
||||
run: ruff check local_code_assistant/
|
||||
|
||||
pip install -e ".[dev]"
|
||||
- name: Build and verify
|
||||
run: |
|
||||
python -m py_compile local_code_assistant/cli.py
|
||||
python -m py_compile local_code_assistant/commands/*.py
|
||||
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
|
||||
run: pytest local_code_assistant/tests/ -v --tb=short
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: pytest local_code_assistant/tests/ --cov=local_code_assistant --cov-report=term-missing
|
||||
|
||||
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'
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
cd local_code_assistant
|
||||
pip install build
|
||||
python -m build
|
||||
|
||||
- name: Verify package
|
||||
run: |
|
||||
cd local_code_assistant
|
||||
pip install dist/*.whl
|
||||
local-code-assistant --version || echo "Package installed successfully"
|
||||
run: pytest tests/ -v --tb=short
|
||||
- name: Run linter
|
||||
run: ruff check .
|
||||
- name: Run type checker
|
||||
run: mypy local_code_assistant/
|
||||
|
||||
Reference in New Issue
Block a user