49
49
- package : tsbrowse
50
50
cache-version : v2
51
51
requirements-path : requirements.txt
52
- additional-setup : source venv/bin/activate && playwright install
52
+ additional-setup : uv run --no-sync playwright install
53
53
54
54
- package : pyslim
55
55
cache-version : v6
@@ -66,10 +66,12 @@ jobs:
66
66
cache-version : v8
67
67
requirements-path : docs/requirements.txt
68
68
69
+
69
70
- package : tszip
70
71
cache-version : v2
71
72
requirements-path : requirements/CI-docs.txt
72
73
74
+
73
75
steps :
74
76
75
77
name : Checkout ${{ matrix.package }}
@@ -94,23 +96,31 @@ jobs:
94
96
name : Docs cache
95
97
with :
96
98
path : dist
97
- key : ${{ matrix.package }}-${{ matrix.version }}-docs-v3 -${{ matrix.cache-version }}-${{ hashFiles('SHA1') }}
99
+ key : ${{ matrix.package }}-${{ matrix.version }}-docs-v4 -${{ matrix.cache-version }}-${{ hashFiles('SHA1') }}
98
100
99
-
100
- if : steps.docs-cache.outputs.cache-hit != 'true'
101
- name : Setup Python
101
+ - name : Install uv and set the python version
102
+ uses : astral-sh/setup-uv@v6
102
103
with :
103
- python-version : ' 3.11'
104
-
105
- - name : Build virtualenv
106
- if : steps.docs-cache.outputs.cache-hit != 'true'
107
- run : python -m venv venv
104
+ python-version : 3.11
105
+ version : " 0.8.15"
108
106
109
107
- name : Install deps
110
108
if : steps.docs-cache.outputs.cache-hit != 'true'
111
109
run : |
112
- source venv/bin/activate
113
- pip install -r ${{ matrix.requirements-path || 'requirements/CI-docs/requirements.txt' }}
110
+ uv venv
111
+ # These can be removed after everything has had a release
112
+ if [ -f "${{ matrix.requirements-path }}" ]; then
113
+ uv pip install -r ${{ matrix.requirements-path }}
114
+ elif [ -f requirements/CI-docs/requirements.txt ]; then
115
+ uv pip install -r requirements/CI-docs/requirements.txt
116
+ elif [ -f pyproject.toml ]; then
117
+ uv pip install -r pyproject.toml --extra docs
118
+ elif [ -f python/pyproject.toml ]; then
119
+ uv pip install -r python/pyproject.toml --extra docs
120
+ else
121
+ echo "No requirements found"
122
+ exit 1
123
+ fi
114
124
115
125
- name : Additional setup
116
126
if : steps.docs-cache.outputs.cache-hit != 'true' && matrix.additional-setup
@@ -119,13 +129,13 @@ jobs:
119
129
- name : Build C module
120
130
if : steps.docs-cache.outputs.cache-hit != 'true' && matrix.make-command
121
131
run : |
122
- source venv/bin/activate
132
+ source . venv/bin/activate
123
133
${{ matrix.make-command }}
124
134
125
135
- name : Build Docs
126
136
if : steps.docs-cache.outputs.cache-hit != 'true'
127
137
run : |
128
- source venv/bin/activate
138
+ source . venv/bin/activate
129
139
cd docs
130
140
make dist
131
141
git checkout .
0 commit comments