1616 name : Scan for changed tasks
1717 steps :
1818 - name : checkout
19- uses : actions/checkout@v4
19+ uses : actions/checkout@v6
2020 with :
2121 fetch-depth : 2 # OR "2" -> To retrieve the preceding commit.
2222
2525 # and prepends the filter name to the standard output names.
2626 - name : Check task folders
2727 id : changed-tasks
28- uses : tj-actions/changed-files@v46.0.5
28+ uses : tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62
2929 with :
3030 # tasks checks the tasks folder and api checks the api folder for changes
3131 files_yaml : |
@@ -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