Update CI workflow with robust configuration
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.9) (push) Has been cancelled
CI / build (push) Has been cancelled
CI / lint (push) Has been cancelled

This commit is contained in:
2026-02-02 18:30:05 +00:00
parent f8e80b402e
commit 834983391c

View File

@@ -7,6 +7,20 @@ on:
branches: [ main, master ]
jobs:
lint:
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 flake8
run: pip install flake8
- name: Run flake8
run: flake8 src/ tests/ --max-line-length=100 --ignore=E501,W503
test:
runs-on: ubuntu-latest
strategy:
@@ -18,18 +32,13 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Lint with flake8
run: |
pip install flake8
flake8 src/ tests/ --max-line-length=100 --ignore=E501,W503
pip install pytest click requests ghapi rich pyyaml diskcache
- name: Run tests
run: |
pip install pytest pytest-cov
pytest tests/ -v --tb=short
run: pytest tests/ -v --tb=short
build:
runs-on: ubuntu-latest
@@ -40,13 +49,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
cache: 'pip'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
python -m build
- name: Build package
run: python -m build
- name: Verify build
run: |
pip install dist/*.whl
pip install requests ghapi
python -c "import code_pattern_search_cli; print('Build successful')"