|
15 | 15 | permissions: |
16 | 16 | contents: read |
17 | 17 |
|
18 | | -env: |
19 | | - UV_SYSTEM_PYTHON: 1 #install packages into system python instead of venv |
20 | | - |
21 | 18 | jobs: |
22 | 19 | python_tests: |
23 | 20 | runs-on: ubuntu-latest |
24 | 21 | steps: |
25 | 22 | - uses: actions/checkout@v4 |
26 | 23 | with: |
27 | 24 | submodules: true |
28 | | - # - uses: actions/setup-python@v5 |
29 | | - # with: |
30 | | - # python-version-file: pyproject.toml |
31 | | - - name: Install uv |
32 | | - uses: astral-sh/setup-uv@v6 |
| 25 | + - uses: actions/setup-python@v5 |
| 26 | + with: |
| 27 | + python-version-file: pyproject.toml |
| 28 | + - uses: actions/cache@v4 |
33 | 29 | with: |
34 | | - enable-cache: true |
35 | | - # - uses: actions/cache@v4 |
36 | | - # with: |
37 | | - # path: ${{ env.pythonLocation }} |
38 | | - # key: ${{ runner.os }}-venv-${{ env.pythonLocation }}-${{ hashFiles('requirements*.txt') }} |
| 30 | + path: ${{ env.pythonLocation }} |
| 31 | + key: ${{ runner.os }}-venv-${{ env.pythonLocation }}-${{ hashFiles('requirements*.txt') }} |
39 | 32 | - if: "contains(matrix.python-version, '-dev')" |
40 | 33 | run: | |
41 | 34 | sudo apt-get update |
42 | 35 | # https://lxml.de/installation.html#requirements |
43 | 36 | sudo apt-get install -y libxml2 libxslt-dev |
44 | | - - name: Set up Python |
45 | | - run: uv python install |
| 37 | + - name: Install uv |
| 38 | + uses: astral-sh/setup-uv@v6 |
46 | 39 | - name: Install dependencies |
| 40 | + env: |
| 41 | + UV_SYSTEM_PYTHON: 1 |
47 | 42 | run: | |
48 | 43 | # Try to upgrade pip, setuptools, and wheel |
49 | | - uv pip install --upgrade setuptools wheel |
| 44 | + uv pip install --upgrade pip setuptools wheel || { |
| 45 | + echo "pip is broken or missing, reinstalling..." |
| 46 | + curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py |
| 47 | + python get-pip.py |
| 48 | + rm -f get-pip.py |
| 49 | + uv pip install --upgrade pip setuptools wheel |
| 50 | + } |
50 | 51 | uv pip install -r requirements_test.txt |
51 | 52 | uv pip list --outdated |
52 | 53 | - run: make git |
|
0 commit comments