@@ -109,19 +109,13 @@ jobs:
109109 sparse-checkout : |
110110 xtest/sdk
111111 requirements.txt
112- - uses : actions /setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
112+ - uses : astral-sh /setup-uv@v6
113113 with :
114114 python-version : " 3.13"
115- - name : Cache UV dependencies
116- uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
117- with :
118- path : ~/.cache/uv
119- key : uv-${{ runner.os }}-${{ hashFiles('otdf-sdk/pyproject.toml') }}
120- restore-keys : |
121- uv-${{ runner.os }}-
115+ enable-cache : true
116+
122117 - name : Install uv and dependencies
123118 run : |-
124- pip install uv
125119 uv venv
126120 source .venv/bin/activate
127121 # Check for requirements.txt in both main branch and current branch locations
@@ -243,24 +237,14 @@ jobs:
243237 repository : opentdf/tests
244238 path : otdftests
245239
246- - name : Set up Python
247- uses : actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
248- with :
249- python-version : " 3.13"
250-
251- - name : Cache UV dependencies
252- uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
240+ - uses : astral-sh/setup-uv@v6
253241 with :
254- path : ~/.cache/uv
255- key : uv-${{ runner.os }}-${{ hashFiles('**/requirements.txt', '**/pyproject.toml') }}
256- restore-keys : |
257- uv-${{ runner.os }}-
242+ python-version : ' 3.13'
243+ enable-cache : true
258244
259245 - name : Install uv and dependencies
260246 run : |
261- pip install uv
262247 uv venv
263- source .venv/bin/activate
264248 uv pip sync requirements.txt
265249 working-directory : otdftests
266250
@@ -406,32 +390,28 @@ jobs:
406390 - name : Validate xtest helper library (tests of the test harness and its utilities)
407391 if : ${{ !inputs }}
408392 run : |-
409- source otdftests/.venv/bin/activate
410- pytest test_nano.py test_self.py
393+ uv run pytest test_nano.py test_self.py
411394 working-directory : otdftests/xtest
412395
413396 # ####### RUN THE TESTS #############
414397 - name : Run legacy decryption tests
415398 run : |-
416- source otdftests/.venv/bin/activate
417- pytest -ra -v --focus "$FOCUS_SDK" test_legacy.py
399+ uv run pytest -ra -v --focus "$FOCUS_SDK" test_legacy.py
418400 working-directory : otdftests/xtest
419401 env :
420402 PLATFORM_DIR : " ../../${{ steps.run-platform.outputs.platform-working-dir }}"
421403 - name : Run all standard xtests
422404 if : ${{ env.FOCUS_SDK == 'all' }}
423405 run : |-
424- source otdftests/.venv/bin/activate
425- pytest -ra -v test_tdfs.py test_policytypes.py
406+ uv run pytest -ra -v test_tdfs.py test_policytypes.py
426407 working-directory : otdftests/xtest
427408 env :
428409 PLATFORM_DIR : " ../../${{ steps.run-platform.outputs.platform-working-dir }}"
429410 SCHEMA_FILE : " manifest.schema.json"
430411 - name : Run xtests focusing on a specific SDK
431412 if : ${{ env.FOCUS_SDK != 'all' }}
432413 run : |-
433- source otdftests/.venv/bin/activate
434- pytest -ra -v --focus "$FOCUS_SDK" test_tdfs.py test_policytypes.py
414+ uv run pytest -ra -v --focus "$FOCUS_SDK" test_tdfs.py test_policytypes.py
435415 working-directory : otdftests/xtest
436416 env :
437417 PLATFORM_DIR : " ../../${{ steps.run-platform.outputs.platform-working-dir }}"
@@ -490,17 +470,15 @@ jobs:
490470 - name : Run attribute based configuration tests
491471 if : ${{ steps.multikas.outputs.supported == 'true' }}
492472 run : |-
493- source otdftests/.venv/bin/activate
494- pytest -ra -v --focus "$FOCUS_SDK" test_abac.py
473+ uv run pytest -ra -v --focus "$FOCUS_SDK" test_abac.py
495474 working-directory : otdftests/xtest
496475 env :
497476 PLATFORM_DIR : " ../../${{ steps.run-platform.outputs.platform-working-dir }}"
498477
499478
500479 - name : Run nano tdf tests
501480 run : |-
502- source otdftests/.venv/bin/activate
503- pytest -ra -v --focus "$FOCUS_SDK" test_nano.py
481+ uv run pytest -ra -v --focus "$FOCUS_SDK" test_nano.py
504482 working-directory : otdftests/xtest
505483 env :
506484 PLATFORM_DIR : " ../../${{ steps.run-platform.outputs.platform-working-dir }}"
@@ -532,6 +510,5 @@ jobs:
532510
533511 - name : Run bdd tests
534512 run : |-
535- source otdftests/.venv/bin/activate
536513 behave
537514 working-directory : otdftests/bdd
0 commit comments