Skip to content

Commit 1840e31

Browse files
committed
revert to working gh actions
1 parent 6c273ec commit 1840e31

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

.github/workflows/python_tests.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,39 @@ on:
1515
permissions:
1616
contents: read
1717

18-
env:
19-
UV_SYSTEM_PYTHON: 1 #install packages into system python instead of venv
20-
2118
jobs:
2219
python_tests:
2320
runs-on: ubuntu-latest
2421
steps:
2522
- uses: actions/checkout@v4
2623
with:
2724
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
3329
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') }}
3932
- if: "contains(matrix.python-version, '-dev')"
4033
run: |
4134
sudo apt-get update
4235
# https://lxml.de/installation.html#requirements
4336
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
4639
- name: Install dependencies
40+
env:
41+
UV_SYSTEM_PYTHON: 1
4742
run: |
4843
# 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+
}
5051
uv pip install -r requirements_test.txt
5152
uv pip list --outdated
5253
- run: make git

0 commit comments

Comments
 (0)