fix: resolve CI linting and type checking errors
This commit is contained in:
@@ -2,30 +2,51 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [ main, master ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [ main, master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
lint:
|
||||||
|
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: Install dependencies
|
||||||
|
run: |
|
||||||
|
pip install ruff mypy
|
||||||
|
|
||||||
|
- name: Run Python linting
|
||||||
|
run: |
|
||||||
|
ruff check scaffoldforge tests
|
||||||
|
ruff format --check scaffoldforge tests
|
||||||
|
|
||||||
|
- name: Run Python type checking
|
||||||
|
run: |
|
||||||
|
python -m mypy scaffoldforge tests
|
||||||
|
|
||||||
test:
|
test:
|
||||||
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]"
|
pip install -e ".[dev]"
|
||||||
- name: Run unit tests
|
|
||||||
run: pytest tests/unit/ -v
|
- name: Run Python tests
|
||||||
- name: Run integration tests
|
run: |
|
||||||
run: pytest tests/integration/ -v
|
pytest tests/ -v --tb=short
|
||||||
- name: Run linter
|
pytest tests/integration/ -v
|
||||||
run: ruff check .
|
|
||||||
- name: Upload coverage
|
|
||||||
uses: codecov/codecov-action@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
files: ./coverage.xml
|
|
||||||
fail_ci_if_error: false
|
|
||||||
|
|||||||
Reference in New Issue
Block a user