chore: remove unused files and configs

- Remove .github/workflows/ (Gitea uses .gitea/workflows/)
- Remove pydoc-markdown.yml (using MkDocs now)
- Remove dist/ and .pytest_cache/ (build artifacts)
- Update .gitignore with .venv/
This commit is contained in:
root 2026-03-29 00:52:50 +00:00
parent 7b8de4af2d
commit 43a75ae09b
3 changed files with 6 additions and 179 deletions

View File

@ -1,156 +0,0 @@
name: CI/CD Pipeline
on:
push:
branches: [main, master]
tags: ['v*']
pull_request:
branches: [main, master]
env:
PYTHON_VERSION: '3.12'
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install UV
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
- name: Set up Python
run: uv python install ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: uv sync --frozen --dev
- name: Run linters
run: uv run ruff check src/ tests/
- name: Run tests
run: uv run pytest --cov=kwork_api --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: false
build:
name: Build
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Install UV
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
run: uv python install ${{ env.PYTHON_VERSION }}
- name: Build package
run: uv build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
release:
name: Semantic Release
runs-on: ubuntu-latest
needs: [test, build, docs]
if: github.ref == 'refs/heads/main'
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install UV
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
run: uv python install ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: uv sync --frozen --dev
- name: Run semantic-release
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
uv run semantic-release version --push --no-mock
publish:
name: Publish to Gitea Registry
runs-on: ubuntu-latest
needs: release
if: startsWith(github.ref, 'refs/tags/v')
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Install UV
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Publish to Gitea
env:
UV_PUBLISH_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
uv publish \
--publish-url https://git.much-data.ru/api/packages/claw/pypi \
--token $UV_PUBLISH_TOKEN
docs:
name: Build & Deploy Documentation
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Install UV
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python
run: uv python install ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: uv sync --frozen --dev
- name: Build docs
run: uv run mkdocs build
- name: Deploy to Gitea Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
gitea_token: ${{ secrets.GITEA_TOKEN }}
gitea_server_url: https://git.much-data.ru
publish_dir: ./site
publish_branch: gh-pages
force_orphan: true

7
.gitignore vendored
View File

@ -1,9 +1,14 @@
# Build
# Build artifacts
site/
dist/
build/
*.egg-info/
# Virtual environments
.venv/
venv/
.env/
# Documentation
api_reference.md

View File

@ -1,22 +0,0 @@
loaders:
- type: python
search_path: [src]
packages: [kwork_api]
processors:
- type: filter
skip_empty_modules: true
documented_only: true
do_not_filter_modules: true
expression: "not (name.startswith('_') and not name.startswith('__'))"
- type: smart
- type: crossref
renderer:
type: markdown
filename: api_reference.md
render_toc: true
descriptive_class_title: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false