Files
code-pattern-search-cli/.gitea/workflows/ci.yml
7000pctAUTO 3210f1916b
Some checks failed
CI / test (3.10) (push) Successful in 9m32s
CI / test (3.11) (push) Successful in 9m33s
CI / test (3.12) (push) Successful in 9m42s
CI / lint (push) Failing after 4m47s
CI / build (push) Successful in 9m33s
fix: resolve CI/CD workflow issues
- Separated lint, test, and build jobs for better error isolation
- Added pip caching to speed up CI runs
- Configured multi-Python version testing (3.10, 3.11, 3.12)
- Updated dependency installation for reliability
2026-02-02 18:31:20 +00:00

79 lines
1.7 KiB
YAML

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