@@ -2,24 +2,18 @@ name: Verify prefect-client build
22
33on :
44 pull_request :
5- branches :
6- - main
75 paths :
86 - client/*
97 - src/prefect/**/*.py
10- - requirements.txt
11- - requirements-client.txt
12- - setup.cfg
8+ - pyproject.toml
139 - .github/workflows/prefect-client.yaml
1410 push :
1511 branches :
1612 - main
1713 paths :
1814 - client/*
1915 - src/prefect/**/*.py
20- - requirements.txt
21- - requirements-client.txt
22- - setup.cfg
16+ - pyproject.toml
2317 - .github/workflows/prefect-client.yaml
2418 workflow_call :
2519 inputs :
@@ -39,16 +33,15 @@ jobs:
3933 steps :
4034 - uses : actions/checkout@v4
4135 with :
42- # Versioneer only generates correct versions with a full fetch
4336 fetch-depth : 0
4437 persist-credentials : false
4538
46- - name : Set up Python
47- uses : actions /setup-python @v5
39+ - name : Set up uv
40+ uses : astral-sh /setup-uv @v5
4841 with :
42+ enable-cache : true
4943 python-version : " 3.9"
50- cache : " pip"
51- cache-dependency-path : " requirements-client.txt"
44+ cache-dependency-glob : " pyproject.toml"
5245
5346 - name : Create a temp dir to stage our build
5447 run : echo "TMPDIR=$(mktemp -d)" >> $GITHUB_ENV
@@ -59,11 +52,11 @@ jobs:
5952 TMPDIR : ${{ env.TMPDIR }}
6053
6154 - name : Build a binary wheel and a source tarball
62- run : pip install wheel && python setup.py sdist bdist_wheel
55+ run : uv build
6356 working-directory : ${{ env.TMPDIR }}
6457
6558 - name : Install the built client from the locally built package
66- run : pip install dist/*.tar.gz
59+ run : uv pip install dist/*.tar.gz
6760 working-directory : ${{ env.TMPDIR }}
6861
6962 - name : Get the version of built `prefect-client`
@@ -74,14 +67,14 @@ jobs:
7467 id : prefect_client_version
7568
7669 - name : Run the smoke test flow using the built client
77- run : python client/client_flow.py
70+ run : uv run python client/client_flow.py
7871 working-directory : ${{ env.TMPDIR }}
7972 env :
8073 PREFECT_API_KEY : ${{ secrets.PREFECT_CLIENT_SA_API_KEY }}
8174 PREFECT_API_URL : " https://api.prefect.cloud/api/accounts/9b649228-0419-40e1-9e0d-44954b5c0ab6/workspaces/96bd3cf8-85c9-4545-9713-b4e3c3e03466" # sandbox, prefect-client workspace
8275
8376 - name : Install prefect from source
84- run : pip install .
77+ run : uv pip install .
8578
8679 - name : Get the version of built `prefect`
8780 run : |
9790 fi
9891
9992 - name : Run the smoke test flow again with prefect and prefect-client installed
100- run : python client/client_flow.py
93+ run : uv run python client/client_flow.py
10194 working-directory : ${{ env.TMPDIR }}
10295 env :
10396 PREFECT_API_KEY : ${{ secrets.PREFECT_CLIENT_SA_API_KEY }}
0 commit comments