From 1dc19f8c1ad289c8c8a6c29e59b480238d560238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D0=BA=D0=BE=D1=81=20=D0=90=D1=80=D1=82=D0=B5?= =?UTF-8?q?=D0=BC=20=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5=D0=B2=D0=B8?= =?UTF-8?q?=D1=87?= Date: Fri, 17 Jul 2026 15:49:27 +0700 Subject: [PATCH] ci: add Gitea Actions workflow for tests and linters - .gitea/workflows/checks.yaml: runs on push to main and every PR, matrix Python 3.10-3.13 (matches requires-python >=3.10), steps: isort, black, ruff check, ruff format, mypy, pytest - dev extras gain black, isort (needed by pip install -e .[dev] in CI) and setuptools>=61.0 (test_formatters_found_by_setuptools imports find_packages at runtime; Python 3.12+ venvs no longer bundle it) - README gains pipeline status badge Closes #53 --- .gitea/workflows/checks.yaml | 26 ++++++++++++++++++++++++++ README.md | 2 ++ pyproject.toml | 3 +++ 3 files changed, 31 insertions(+) create mode 100644 .gitea/workflows/checks.yaml diff --git a/.gitea/workflows/checks.yaml b/.gitea/workflows/checks.yaml new file mode 100644 index 0000000..feaa9d8 --- /dev/null +++ b/.gitea/workflows/checks.yaml @@ -0,0 +1,26 @@ +name: checks + +on: + push: + branches: [main] + pull_request: + +jobs: + checks: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pip + - run: pip install -e .[dev] + - run: isort --check-only redmine_reporter tests + - run: black --check redmine_reporter tests + - run: ruff check redmine_reporter tests + - run: ruff format --check redmine_reporter tests + - run: mypy redmine_reporter + - run: pytest -v diff --git a/README.md b/README.md index ae21a33..181177a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # redmine-reporter +[![checks](https://git.akokos.ru/artem.kokos/redmine-reporter/actions/workflows/checks.yaml/badge.svg)](https://git.akokos.ru/artem.kokos/redmine-reporter/actions) + CLI-инструмент для генерации отчётов по задачам Redmine на основе записей о затраченном времени. Проект предназначен для внутреннего использования с `https://red.eltex.loc/`. diff --git a/pyproject.toml b/pyproject.toml index 3380787..da03cb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,9 @@ dev = [ "pytest>=7.0", "mypy>=1.0", "ruff>=0.1.0", + "black>=24.0", + "isort>=5.0", + "setuptools>=61.0", ] [project.scripts]