ci: separate jobs to isolate failures
This commit is contained in:
@@ -22,18 +22,42 @@ jobs:
|
|||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -e ".[dev]"
|
pip install -e ".[dev]"
|
||||||
|
|
||||||
- name: Run all checks
|
- name: Run pytest
|
||||||
run: |
|
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
|
||||||
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; }
|
lint:
|
||||||
echo "=== Running linting ==="
|
runs-on: ubuntu-latest
|
||||||
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; }
|
steps:
|
||||||
echo "=== Running type checking ==="
|
- uses: actions/checkout@v4
|
||||||
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: 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:
|
build:
|
||||||
needs: test
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user