diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d09ed6c..a692778 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -8,23 +8,24 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: Install Python with timeout + - name: Check system run: | - timeout 120 apt-get update || echo "apt-get update timed out or failed" - timeout 120 apt-get install -y python3 python3-pip || echo "apt-get install timed out or failed" - - name: Verify Python + uname -a + cat /etc/os-release 2>/dev/null | head -5 + - name: Install Python run: | + if ! command -v python3 &> /dev/null; then + curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py + curl -sSL https://www.python.org/ftp/python/3.11.0/python-3.11.0-linux-x86_64.tar.gz -o python.tar.gz + tar -xzf python.tar.gz + export PATH="/app/python-3.11.0:$PATH" + fi python3 --version - pip3 --version - name: Install deps - run: | - pip3 install -e ".[dev]" + run: pip3 install -e ".[dev]" - name: Lint - run: | - ruff check src/ + run: ruff check src/ - name: Type check - run: | - mypy src/ + run: mypy src/ - name: Test - run: | - pytest tests/ -v \ No newline at end of file + run: pytest tests/ -v \ No newline at end of file