Files
quickbot_cli/.gitea/workflows/ci.yaml
Alexander Kalinovsky eef69f32c7
Some checks failed
CI / test (3.13) (push) Failing after 50s
chore: update CI workflow to include cleanup steps and refine MyPy checks for specific directories
2025-08-27 19:59:52 +03:00

95 lines
2.3 KiB
YAML

# SPDX-FileCopyrightText: 2025 Alexander Kalinovsky <a@k8y.ru>
#
# SPDX-License-Identifier: Apache-2.0
name: CI
on:
push:
branches:
- main
- dev
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.13"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Cache uv dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/uv
.venv
key: ${{ runner.os }}-uv-${{ hashFiles('**/uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Install dependencies
run: |
uv sync --all-extras --dev
- name: Show versions
run: |
python --version
uv --version
uv pip list
- name: Build package
run: |
uv build
- name: Test package installation
run: |
uv pip install dist/*.whl
uv run quickbot --help
- name: Test CLI functionality
run: |
mkdir -p test_cli_output
uv run quickbot init --output test_cli_output --project-name "CI Test" --description "Test Description" --author "CI" --license-name MIT --no-include-alembic --no-include-i18n --no-interactive
ls -la test_cli_output/
cat test_cli_output/pyproject.toml
- name: Clean up test files
run: |
rm -rf test_cli_output/
- name: Ruff (lint + format check)
run: |
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
- name: MyPy
run: |
uv run mypy src/ tests/
- name: Pytest
run: |
uv run pytest tests/ --cov=src/quickbot_cli --cov-report=term-missing --cov-report=html -v
env:
NO_COLOR: "1"
COLUMNS: "120"
TERM: "dumb"
PYTHONIOENCODING: "utf-8"
- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/
retention-days: 30