Files
code-pattern-search-cli/.gitea/workflows/ci.yml
7000pctAUTO 834983391c
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
Update CI workflow with robust configuration
2026-02-02 18:30:05 +00:00

63 lines
1.6 KiB
YAML

name: CI
on:
push:
branches: [ main, master ]
pull_request:
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:
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
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 pytest click requests ghapi rich pyyaml diskcache
- name: Run tests
run: pytest tests/ -v --tb=short
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'
cache: 'pip'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Verify build
run: |
pip install dist/*.whl
python -c "import code_pattern_search_cli; print('Build successful')"