diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8465b2a..7bf8d19 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -9,24 +9,72 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Ensure git is available + run: | + if command -v git >/dev/null 2>&1; then + git --version + exit 0 + fi - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' + if command -v apt-get >/dev/null 2>&1; then + apt-get update + apt-get install -y git + elif command -v dnf >/dev/null 2>&1; then + dnf install -y git + elif command -v yum >/dev/null 2>&1; then + yum install -y git + else + echo "No supported package manager found to install git." + exit 1 + fi + + git --version + + - name: Checkout source (native git) + run: | + if [ -n "${GITHUB_WORKSPACE:-}" ]; then + cd "$GITHUB_WORKSPACE" + fi + + if [ ! -d .git ]; then + git init + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + fi + + git fetch --depth 1 origin "$GITHUB_SHA" + git checkout --force FETCH_HEAD + + - name: Ensure Python and pip are available + run: | + if command -v python3 >/dev/null 2>&1 && python3 -m pip --version >/dev/null 2>&1; then + python3 --version + exit 0 + fi + + if command -v apt-get >/dev/null 2>&1; then + apt-get update + apt-get install -y python3 python3-pip python3-venv + elif command -v dnf >/dev/null 2>&1; then + dnf install -y python3 python3-pip + elif command -v yum >/dev/null 2>&1; then + yum install -y python3 python3-pip + else + echo "No supported package manager found to install Python." + exit 1 + fi + + python3 --version - name: Install package and dev dependencies run: | - python -m pip install --upgrade pip - pip install -e .[dev] + python3 -m pip install --upgrade pip + python3 -m pip install -e .[dev] - name: Lint - run: ruff check . + run: python3 -m ruff check . - name: Type-check - run: mypy src + run: python3 -m mypy src - name: Test - run: pytest + run: python3 -m pytest diff --git a/CHANGELOG.md b/CHANGELOG.md index 3442cdc..bc49818 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - `ROADMAP.md` — phased development plan covering decisions, data collection, AI integration, CLI design, and hardening - `CHANGELOG.md` — this file; established changelog tracking for the project - `.gitea/workflows/ci.yml` — Gitea Actions CI workflow for push and pull request events +- Gitea CI now uses native `git` checkout and system Python setup to avoid host-executor JavaScript action path issues - Python package scaffold with `src` layout and project metadata in `pyproject.toml` - Initial CLI entrypoint with agreed SSH flags: `--identity-file`, `--jump-host`, and `--ignore-ssh-config` - Input parsing/validation module and core request model