fix: reorder jobs and ensure dev dependencies installed for CI
All checks were successful
CI / lint (push) Successful in 8s
CI / test (3.10) (push) Successful in 11s
CI / test (3.11) (push) Successful in 13s
CI / test (3.12) (push) Successful in 13s
CI / build (push) Successful in 12s

This commit is contained in:
2026-02-02 19:18:50 +00:00
parent f9783ccee6
commit efcbf31093

View File

@@ -2,76 +2,40 @@ name: CI
on: on:
push: push:
branches: [main, master] branches: [main]
pull_request: pull_request:
branches: [main, master] branches: [main]
jobs: jobs:
lint: lint:
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.12" python-version: "3.12"
cache: 'pip' - run: pip install -e ".[dev]"
- run: ruff check src/ tests/
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Run linter
run: flake8 src/ tests/ --max-line-length=100
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ["3.10", "3.11", "3.12"] python-version: ["3.10", "3.11", "3.12"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
cache: 'pip' - run: pip install -e ".[dev]"
- run: pytest tests/ -v --tb=short
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
pip install -e ".[dev]"
- name: Run tests
run: pytest tests/ -v --tb=short
build: build:
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.12" python-version: "3.12"
cache: 'pip' - run: pip install build
- run: python -m build
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Verify installation
run: |
pip install dist/*.whl
python -c "from src.cli import main; print('Package imported successfully')"