Files
gitea-ci/.gitea/workflows/ci.yml
Username 8d05e90160
Some checks failed
CI / Lint & Check (push) Failing after 12s
refactor: restructure into src/gitea_ci package
Split monolithic gitea-ci.py (3068 lines) into modular package:
- src/gitea_ci/config.py: configuration, constants
- src/gitea_ci/api.py: GiteaAPI class
- src/gitea_ci/formatters.py: output formatting
- src/gitea_ci/utils.py: utilities, validation
- src/gitea_ci/commands/: command implementations
- src/gitea_ci/cli.py: argument parser, dispatch

gitea-ci.py now thin wrapper (16 lines)
2026-01-18 18:59:22 +01:00

43 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint & Check
runs-on: ubuntu-latest
container:
image: python:3.11-slim
steps:
- name: Setup and checkout
run: |
apt-get update -qq && apt-get install -yqq --no-install-recommends git >/dev/null
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
"https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" .
- name: Install tools
run: pip install -q ruff
- name: Syntax check
run: |
python -m py_compile gitea-ci.py style.py
python -m py_compile src/gitea_ci/*.py src/gitea_ci/commands/*.py
- name: Lint
run: ruff check gitea-ci.py style.py src/gitea_ci/
- name: Test --help
run: python gitea-ci.py --help
- name: Test import
run: python -c "from src.gitea_ci import Config, GiteaAPI, __version__; print(f'v{__version__}')"