@@ -44,28 +44,24 @@ jobs:
4444 echo "One or more test file(s) has changed."
4545 echo "List of all the files that have changed: ${{ steps.changed-tasks.outputs.tasks_all_modified_files }}"
4646
47- - name : Set up Python 3.10
47+ - name : Install uv
4848 if : steps.changed-tasks.outputs.tasks_any_modified == 'true' || steps.changed-tasks.outputs.api_any_modified == 'true'
49- uses : actions /setup-python@v5
49+ uses : astral-sh /setup-uv@v7
5050 with :
51- python-version : ' 3.10'
52- cache : ' pip'
53- cache-dependency-path : pyproject.toml
51+ enable-cache : true
52+ python-version : " 3.10"
5453 - name : Install dependencies
5554 if : steps.changed-tasks.outputs.tasks_any_modified == 'true' || steps.changed-tasks.outputs.api_any_modified == 'true'
5655 run : |
57- python -m pip install --upgrade pip
58- pip install -e '.[dev,ifeval,unitxt,math,longbench]' --extra-index-url https://download.pytorch.org/whl/cpu
59- # Install optional git dependencies
60- # pip install bleurt@https://github.com/google-research/bleurt/archive/b610120347ef22b494b6d69b4316e303f5932516.zip#egg=bleurt
61- # if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
56+ uv venv
57+ uv pip install -e '.[dev,ifeval,unitxt,math,longbench]' --extra-index-url https://download.pytorch.org/whl/cpu
6258 - name : Test with pytest
6359 # if new tasks are added, run tests on them
6460 if : steps.changed-tasks.outputs.tasks_any_modified == 'true'
65- run : python -m pytest tests/test_tasks.py -s -vv
61+ run : uv run pytest tests/test_tasks.py -s -vv
6662 # if api is modified, run tests on it
6763 - name : Test more tasks with pytest
6864 env :
6965 API : true
7066 if : steps.changed-tasks.outputs.api_any_modified == 'true'
71- run : python -m pytest tests/test_tasks.py -s -vv
67+ run : uv run pytest tests/test_tasks.py -s -vv
0 commit comments