@@ -3,13 +3,13 @@ name: Build
3
3
on :
4
4
push :
5
5
branches :
6
- - ' master'
6
+ - " master"
7
7
paths-ignore :
8
- - ' docs/**'
9
- - ' mkdocs.yml'
8
+ - " docs/**"
9
+ - " mkdocs.yml"
10
10
pull_request :
11
11
branches :
12
- - ' master'
12
+ - " master"
13
13
workflow_dispatch :
14
14
inputs :
15
15
intergation-tests :
@@ -56,20 +56,20 @@ jobs:
56
56
path : frontend/build
57
57
58
58
python-test :
59
- needs : [ python-lint, frontend-build ]
59
+ needs : [python-lint, frontend-build]
60
60
runs-on : ${{ matrix.os }}
61
61
strategy :
62
62
matrix :
63
- os : [ macos-latest, ubuntu-latest, windows-latest ]
64
- python-version : [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
63
+ os : [macos-latest, ubuntu-latest, windows-latest]
64
+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
65
65
steps :
66
66
- uses : actions/checkout@v4
67
67
- name : Set up Python ${{ matrix.python-version }}
68
- uses : actions /setup-python @v5
68
+ uses : astral-sh /setup-uv @v5
69
69
with :
70
70
python-version : ${{ matrix.python-version }}
71
71
- name : Install dependencies
72
- run : pip install -U '.[ all]' -r requirements_dev.txt
72
+ run : uv sync -- all-extras --frozen
73
73
- name : Download frontend build
74
74
uses : actions/download-artifact@v4
75
75
with :
@@ -83,15 +83,15 @@ jobs:
83
83
if [ "${{ matrix.os }}" != "macos-latest" ]; then
84
84
RUNPOSTGRES="--runpostgres"
85
85
fi
86
- pytest src/tests --runui $RUNPOSTGRES
86
+ uv run pytest src/tests --runui $RUNPOSTGRES
87
87
- name : Run pytest on Windows
88
88
if : matrix.os == 'windows-latest'
89
89
run : |
90
- pytest src/tests --runui --runpostgres
90
+ uv run pytest src/tests --runui --runpostgres
91
91
92
92
update-get-dstack :
93
93
if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
94
- needs : [ python-test ]
94
+ needs : [python-test]
95
95
runs-on : ubuntu-latest
96
96
env :
97
97
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -201,24 +201,24 @@ jobs:
201
201
202
202
generate-json-schema :
203
203
if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
204
- needs : [ python-test ]
204
+ needs : [python-test]
205
205
env :
206
206
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
207
207
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
208
208
runs-on : ubuntu-latest
209
209
steps :
210
210
- uses : actions/checkout@v4
211
- - uses : actions /setup-python @v5
211
+ - uses : astral-sh /setup-uv @v5
212
212
with :
213
213
python-version : 3.11
214
214
- name : Install AWS
215
- run : pip install awscli
215
+ run : uv tool install awscli
216
216
- name : Install dstack
217
- run : pip install .
217
+ run : uv sync --frozen
218
218
- name : Generate json schema
219
219
run : |
220
- python -c "from dstack._internal.core.models.configurations import DstackConfiguration; print(DstackConfiguration.schema_json(indent=2))" > configuration.json
221
- python -c "from dstack._internal.core.models.profiles import ProfilesConfig; print(ProfilesConfig.schema_json(indent=2))" > profiles.json
220
+ uv run python -c "from dstack._internal.core.models.configurations import DstackConfiguration; print(DstackConfiguration.schema_json(indent=2))" > configuration.json
221
+ uv run python -c "from dstack._internal.core.models.profiles import ProfilesConfig; print(ProfilesConfig.schema_json(indent=2))" > profiles.json
222
222
- name : Upload json schema to S3
223
223
run : |
224
224
VERSION=$((${{ github.run_number }} + ${{ env.BUILD_INCREMENT }}))
@@ -235,20 +235,18 @@ jobs:
235
235
working-directory : gateway
236
236
steps :
237
237
- uses : actions/checkout@v4
238
- - name : Set up Python 3.11
239
- uses : actions /setup-python @v5
238
+ - name : Set up uv
239
+ uses : astral-sh /setup-uv @v5
240
240
with :
241
241
python-version : 3.11
242
242
- name : Install AWS
243
- run : pip install awscli
244
- - name : Install dependencies
245
- run : pip install wheel build
243
+ run : uv tool install awscli
246
244
- name : Compute version
247
245
run : echo VERSION=$((${{ github.run_number }} + ${{ env.BUILD_INCREMENT }})) > $GITHUB_ENV
248
246
- name : Build package
249
247
run : |
250
248
echo "__version__ = \"${{ env.VERSION }}\"" > src/dstack/gateway/version.py
251
- python -m build .
249
+ uv build
252
250
- name : Upload to S3
253
251
env :
254
252
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -257,23 +255,24 @@ jobs:
257
255
WHEEL=dstack_gateway-${{ env.VERSION }}-py3-none-any.whl
258
256
aws s3 cp dist/$WHEEL "s3://dstack-gateway-downloads/stgn/$WHEEL"
259
257
echo "${{ env.VERSION }}" | aws s3 cp - "s3://dstack-gateway-downloads/stgn/latest-version"
260
-
258
+
261
259
docs-build :
262
260
# Skip for PRs from forks since mkdocs-material-insiders is not available in forks
263
261
if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
264
262
runs-on : ubuntu-latest
265
263
steps :
266
264
- uses : actions/checkout@v4
267
- - uses : actions /setup-python @v5
265
+ - uses : astral-sh /setup-uv @v5
268
266
with :
269
267
python-version : 3.11
270
268
- name : Install dstack
271
269
run : |
272
- pip install -e .[server]
270
+ uv sync --extra server --frozen
271
+ # Move these deps into an extra and install that way
273
272
- name : Build
274
273
run : |
275
- pip install pillow cairosvg
274
+ uv pip install pillow cairosvg
276
275
sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
277
- pip install mkdocs-material "mkdocs-material[imaging]" mkdocs-material-extensions mkdocs-redirects mkdocs-gen-files "mkdocstrings[python]" mkdocs-render-swagger-plugin --upgrade
278
- pip install git+https://${{ secrets.GH_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git
279
- mkdocs build -s
276
+ uv pip install mkdocs-material "mkdocs-material[imaging]" mkdocs-material-extensions mkdocs-redirects mkdocs-gen-files "mkdocstrings[python]" mkdocs-render-swagger-plugin --upgrade
277
+ uv pip install git+https://${{ secrets.GH_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git
278
+ uv mkdocs build -s
0 commit comments