ci: separate jobs to isolate failures
This commit is contained in:
@@ -22,18 +22,42 @@ jobs:
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e ".[dev]"
|
||||
|
||||
- name: Run all checks
|
||||
run: |
|
||||
echo "=== Running tests ==="
|
||||
pytest tests/test_parser.py tests/test_explainer.py tests/test_cli.py tests/conftest.py -v --cov=src/cli_explain_fix --cov-report=term-missing || { echo "TESTS FAILED"; exit 1; }
|
||||
echo "=== Running linting ==="
|
||||
pip install ruff && ruff check src/cli_explain_fix/ tests/test_parser.py tests/test_explainer.py tests/test_cli.py tests/conftest.py || { echo "LINTING FAILED"; exit 1; }
|
||||
echo "=== Running type checking ==="
|
||||
pip install mypy && mypy src/cli_explain_fix/ tests/test_parser.py tests/test_explainer.py tests/test_cli.py tests/conftest.py || { echo "TYPE CHECKING FAILED"; exit 1; }
|
||||
echo "=== All checks passed ==="
|
||||
- name: Run pytest
|
||||
run: pytest tests/test_parser.py tests/test_explainer.py tests/test_cli.py tests/conftest.py -v --cov=src/cli_explain_fix --cov-report=term-missing
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install ruff
|
||||
run: pip install ruff
|
||||
|
||||
- name: Run linting
|
||||
run: ruff check src/cli_explain_fix/ tests/test_parser.py tests/test_explainer.py tests/test_cli.py tests/conftest.py
|
||||
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install mypy
|
||||
run: pip install mypy
|
||||
|
||||
- name: Run type checking
|
||||
run: mypy src/cli_explain_fix/ tests/test_parser.py tests/test_explainer.py tests/test_cli.py tests/conftest.py
|
||||
|
||||
build:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user