From 648d5ac7420a3fc5b79022eaf570ed6838b60e78 Mon Sep 17 00:00:00 2001 From: ilia Date: Tue, 26 May 2026 20:07:49 -0400 Subject: [PATCH] Fix CI for Gitea act_runner: python3 and local docker build. Use python3 instead of unavailable python3.11 packages, drop apt step that failed on runner image, and replace buildx with docker build so the test step can run the built image. --- .github/workflows/ci.yml | 39 ++++++++++++--------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99009a4..d8fd7c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,15 +28,10 @@ jobs: - name: Check out code uses: actions/checkout@v4 - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y postgresql-client python3.11 python3.11-venv python3-pip - - name: Install Python dependencies run: | - pip install --upgrade pip - pip install -e ".[dev]" + python3 -m pip install --upgrade pip + python3 -m pip install -e ".[dev]" - name: Run linters run: | @@ -56,7 +51,7 @@ jobs: SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD || 'dummy' }} FROM_EMAIL: ${{ secrets.FROM_EMAIL || 'test@example.com' }} run: | - pytest tests/ -v --cov=src/pote --cov-report=term --cov-report=xml + python3 -m pytest tests/ -v --cov=src/pote --cov-report=term --cov-report=xml - name: Test scripts env: @@ -75,19 +70,19 @@ jobs: - name: Install dependencies run: | - python3.11 -m pip install --upgrade pip - python3.11 -m pip install safety bandit + python3 -m pip install --upgrade pip + python3 -m pip install safety bandit - name: Run safety check run: | - python3.11 -m pip install -e . - python3.11 -m safety check --json || true + python3 -m pip install -e . + python3 -m safety check --json || true continue-on-error: true - name: Run bandit security scan run: | - python3.11 -m bandit -r src/ -f json -o bandit-report.json || true - python3.11 -m bandit -r src/ -f screen + python3 -m bandit -r src/ -f json -o bandit-report.json || true + python3 -m bandit -r src/ -f screen continue-on-error: true dependency-scan: @@ -111,20 +106,10 @@ jobs: - name: Check out code uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build Docker image - uses: docker/build-push-action@v5 - with: - context: . - push: false - tags: pote:test - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Test Docker image + - name: Build and test Docker image run: | + # Plain docker build — buildx images are not visible to act_runner's docker run + docker build -t pote:test . docker run --rm pote:test python -c "import pote; print('POTE import successful')" workflow-summary: