Fix CI workflow for shellgenius project
- Changed from Rust/Cargo workflow to Python/pytest workflow - Added proper Python 3.11 setup - Added test, lint, and type-check jobs for Python project - Fixed linting to only check shellgenius/ and tests/ directories
This commit is contained in:
@@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
@@ -22,15 +22,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pytest tests/ -v --tb=short
|
run: pytest tests/ -v --tb=short
|
||||||
|
|
||||||
- name: Check code coverage
|
|
||||||
run: pytest tests/ --cov=shellgenius --cov-report=term-missing
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
@@ -39,13 +36,13 @@ jobs:
|
|||||||
run: pip install ruff>=0.1.0
|
run: pip install ruff>=0.1.0
|
||||||
|
|
||||||
- name: Run ruff linter
|
- name: Run ruff linter
|
||||||
run: ruff check .
|
run: ruff check shellgenius/ tests/
|
||||||
|
|
||||||
type-check:
|
type-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|||||||
Reference in New Issue
Block a user