diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index a96d564..7a3006b 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -71,12 +71,12 @@ jobs: - name: Ruff (lint + format check) run: | - uv run ruff check src/ tests/ - uv run ruff format --check src/ tests/ + uv run ruff check + uv run ruff format --check - name: MyPy run: | - uv run mypy src/ tests/ + uv run mypy . - name: Pytest run: | uv run pytest tests/ --cov=src/quickbot_cli --cov-report=term-missing --cov-report=html -v diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d20738..52e7a71 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.10 + rev: v0.12.12 hooks: - id: ruff-check args: ["--fix"] @@ -26,6 +26,6 @@ repos: hooks: - id: codespell - repo: https://github.com/fsfe/reuse-tool - rev: v5.0.2 + rev: v5.1.1 hooks: - id: reuse \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9a4957b..225c1a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,10 +18,9 @@ authors = [ ] readme = "README.md" requires-python = ">=3.13" -license = { text = "MIT" } +license = { text = "Apache-2.0" } dependencies = [ "typer", - "quickbot>=0.1.1", "jinja2", "pyyaml", ] @@ -62,12 +61,6 @@ python_version = "3.13" strict = true ignore_missing_imports = true warn_unused_ignores = true -exclude = [ - "test_cli_output/", - "dist/", - ".venv/", - ".mypy_cache/" -] [tool.hatch.version] source = "vcs" diff --git a/scripts/local_ci.sh b/scripts/local_ci.sh index 8deacb1..a1b349f 100755 --- a/scripts/local_ci.sh +++ b/scripts/local_ci.sh @@ -4,16 +4,16 @@ # # SPDX-License-Identifier: Apache-2.0 -# Local CI script to test the same steps as the Gitea workflow +# Local CI script to run all checks and a packaging/CLI smoke test set -e -echo "๐Ÿš€ Running local CI tests..." +echo "๐Ÿš€ Running local CI checks and smoke tests..." echo "๐Ÿ“ฆ Installing dependencies..." uv sync --all-extras --dev echo "๐Ÿ” Running Ruff linting..." -uv run ruff check . +uv run ruff check echo "๐ŸŽจ Checking code formatting..." uv run ruff format --check @@ -27,4 +27,36 @@ uv run reuse lint echo "๐Ÿงช Running tests..." uv run pytest -echo "โœ… All checks passed!" +echo "๐Ÿงช Testing CI workflow steps locally (package build and CLI)..." + +echo "๐Ÿ“ฆ Building package..." +uv build + +echo "๐Ÿ”ง Testing package installation..." +uv pip install dist/*.whl + +echo "โ“ Testing help command..." +uv run quickbot --help + +echo "๐Ÿš€ Testing CLI functionality..." +mkdir -p test_cli_output +uv run quickbot init \ + --output test_cli_output \ + --project-name "Local Test" \ + --description "Local Test Description" \ + --author "Local Test" \ + --license-name MIT \ + --no-include-alembic \ + --no-include-i18n \ + --no-interactive + +echo "๐Ÿ“ Checking generated files..." +ls -la test_cli_output/ +echo "๐Ÿ“„ Generated pyproject.toml:" +cat test_cli_output/pyproject.toml + +echo "๐Ÿงน Cleaning up..." +rm -rf test_cli_output +rm -rf dist/* + +echo "โœ… All checks and smoke tests passed!" diff --git a/scripts/test_ci_locally.sh b/scripts/test_ci_locally.sh deleted file mode 100755 index 03d7327..0000000 --- a/scripts/test_ci_locally.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# SPDX-FileCopyrightText: 2025 Alexander Kalinovsky -# -# SPDX-License-Identifier: Apache-2.0 - -# Test CI workflow steps locally -set -e - -echo "๐Ÿงช Testing CI workflow steps locally..." - -echo "๐Ÿ“ฆ Building package..." -uv build - -echo "๐Ÿ”ง Testing package installation..." -uv pip install dist/*.whl - -echo "โ“ Testing help command..." -uv run quickbot --help - -echo "๐Ÿš€ Testing CLI functionality..." -mkdir -p test_cli_output -uv run quickbot init \ - --output test_cli_output \ - --project-name "Local Test" \ - --description "Local Test Description" \ - --author "Local Test" \ - --license-name MIT \ - --no-include-alembic \ - --no-include-i18n \ - --no-interactive - -echo "๐Ÿ“ Checking generated files..." -ls -la test_cli_output/ -echo "๐Ÿ“„ Generated pyproject.toml:" -cat test_cli_output/pyproject.toml - -echo "๐Ÿงน Cleaning up..." -rm -rf test_cli_output -rm -rf dist/* - -echo "โœ… All CI workflow steps passed locally!"