Fix CI: replace actions/checkout with git clone for node-less containers
python:3.12-slim lacks node, so actions/checkout@v4 fails. Use manual git clone with Gitea environment variables instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4aaf61e472
commit
5dccc44c72
@ -11,7 +11,12 @@ jobs:
|
||||
container:
|
||||
image: python:3.12-slim
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install git
|
||||
run: apt-get update && apt-get install -y --no-install-recommends git
|
||||
- name: Checkout
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git clone --depth=1 --branch="${GITHUB_REF_NAME}" "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" || git clone --depth=1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE"
|
||||
- run: pip install ruff black
|
||||
- name: Check formatting
|
||||
run: black --check src/ tests/ frontends/
|
||||
@ -23,7 +28,12 @@ jobs:
|
||||
container:
|
||||
image: python:3.12-slim
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install git
|
||||
run: apt-get update && apt-get install -y --no-install-recommends git
|
||||
- name: Checkout
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git clone --depth=1 --branch="${GITHUB_REF_NAME}" "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" || git clone --depth=1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE"
|
||||
- run: pip install mypy
|
||||
- run: mypy src/
|
||||
|
||||
@ -32,7 +42,12 @@ jobs:
|
||||
container:
|
||||
image: python:3.12-slim
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install git
|
||||
run: apt-get update && apt-get install -y --no-install-recommends git
|
||||
- name: Checkout
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git clone --depth=1 --branch="${GITHUB_REF_NAME}" "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" || git clone --depth=1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE"
|
||||
- name: Install dependencies
|
||||
run: pip install -e ".[dev]"
|
||||
- name: Run tests
|
||||
|
||||
Loading…
Reference in New Issue
Block a user