From 2ca08443b9c24edb97bc17cb0984b8d683c96197 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sun, 1 Feb 2026 05:20:51 +0000 Subject: [PATCH] Simplify CI workflow - use available python3 and avoid apt-get if not needed --- .gitea/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index a6d6b10..93c53c6 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -12,18 +12,18 @@ jobs: steps: - name: Checkout code run: | - mkdir -p ${{ github.repository }} - git clone https://gitea.com/${{ github.repository }} . + git clone https://gitea.com/${{ github.repository }} ${{ github.workspace }} + cd ${{ github.workspace }} git checkout ${{ github.sha }} - name: Set up Python run: | - apt-get update - apt-get install -y python3 python3-pip - python3 -m pip install --upgrade pip + which python3 || (apt-get update && apt-get install -y python3 python3-pip) + python3 --version - name: Install dependencies run: | - pip3 install -e . - pip3 install pytest + python3 -m pip install --upgrade pip + python3 -m pip install -e . + python3 -m pip install pytest - name: Run tests run: | python3 -m pytest tests/ -v