fix: resolve CI workflow and configuration issues
This commit is contained in:
@@ -2,42 +2,51 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main, master ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main, master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: '3.11'
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
pip install ruff mypy
|
||||||
pip install pytest pytest-cov
|
|
||||||
pip install typer rich pyyaml
|
|
||||||
pip install tomli
|
|
||||||
|
|
||||||
- name: Run tests with pytest
|
- name: Run Python linting
|
||||||
run: pytest -v --tb=short
|
|
||||||
|
|
||||||
- name: Lint with ruff
|
|
||||||
run: |
|
run: |
|
||||||
pip install ruff
|
ruff check config_convert tests
|
||||||
ruff check .
|
ruff format --check config_convert tests
|
||||||
|
|
||||||
- name: Type check with mypy
|
- name: Run Python type checking
|
||||||
run: |
|
run: |
|
||||||
pip install mypy
|
python -m mypy config_convert tests
|
||||||
mypy src/
|
|
||||||
|
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: Install dependencies
|
||||||
|
run: |
|
||||||
|
pip install -e ".[dev]"
|
||||||
|
|
||||||
|
- name: Run Python tests
|
||||||
|
run: |
|
||||||
|
pytest tests/ -v --tb=short
|
||||||
|
pytest tests/integration/ -v
|
||||||
|
|||||||
Reference in New Issue
Block a user