fix: verify CI compliance - all tests pass locally
Some checks failed
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled

This commit is contained in:
2026-02-02 13:07:43 +00:00
parent 2fbec260ad
commit 3532565a95

View File

@@ -2,18 +2,76 @@ name: CI
on:
push:
branches: [main]
branches: [main, master]
pull_request:
branches: [main]
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install -e ".[dev]"
- run: pytest tests/ -v
- run: ruff check .
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
pip install pytest-cov
- name: Download spaCy model
run: python -m spacy download en_core_web_sm
- name: Lint with Ruff
run: pip install ruff && ruff check src/ tests/
- name: Check formatting with Black
run: pip install black && black --check src/ tests/
- name: Type check with MyPy
run: pip install mypy && mypy src/ --python-version 3.11
- name: Run tests
run: pytest tests/ -v --tb=short
- name: Run tests with coverage
run: pytest tests/ --cov=src/nl2gherkin --cov-report=term-missing --cov-report=xml
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: false
build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install build dependencies
run: pip install build
- name: Build package
run: python -m build
- name: Verify package
run: pip install dist/*.whl && nl2gherkin --help