chore: update pre-commit hooks and workflow packages (#4023)

This commit is contained in:
Baber Abbasi
2026-08-20 18:43:24 +05:00
committed by GitHub
parent 4850314509
commit cc9b6c2a2a
4 changed files with 23 additions and 15 deletions
+7 -3
View File
@@ -21,7 +21,7 @@ jobs:
name: Scan for changed tasks
steps:
- name: checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 2 # OR "2" -> To retrieve the preceding commit.
@@ -51,9 +51,10 @@ jobs:
- name: Install uv
if: steps.changed-tasks.outputs.tasks_any_modified == 'true' || steps.changed-tasks.outputs.api_any_modified == 'true'
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
enable-cache: "auto"
prune-cache: true
python-version: "3.10"
activate-environment: true
- name: Install dependencies
@@ -63,10 +64,13 @@ jobs:
- name: Test with pytest
# if new tasks are added, run tests on them
if: steps.changed-tasks.outputs.tasks_any_modified == 'true'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: pytest -x -s -vv tests/test_tasks.py
# if api is modified, run tests on it
- name: Test more tasks with pytest
env:
API: true
HF_TOKEN: ${{ secrets.HF_TOKEN }}
if: steps.changed-tasks.outputs.api_any_modified == 'true'
run: pytest -x -s -vv -n=auto tests/test_tasks.py
+2 -2
View File
@@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.x"
+11 -7
View File
@@ -26,13 +26,14 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
enable-cache: "auto"
prune-cache: true
python-version: "3.10"
activate-environment: true
- name: Install pip
@@ -54,17 +55,18 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout Code
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
enable-cache: "auto"
prune-cache: true
python-version: ${{ matrix.python-version }}
activate-environment: true
# Cache HuggingFace cache directory for CPU tests
- name: Cache HuggingFace cache (CPU tests)
uses: actions/cache@v5
uses: actions/cache@v6
id: cache-hf-cpu
with:
path: ~/.cache/huggingface
@@ -78,6 +80,8 @@ jobs:
uv pip install hf_xet
- name: Test with pytest
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: pytest -x --showlocals -s -vv -n=auto --ignore=tests/models/test_openvino.py --ignore=tests/models/test_hf_steered.py --ignore=tests/scripts/test_zeno_visualize.py
# Save test artifacts
+3 -3
View File
@@ -27,7 +27,7 @@ repos:
- id: mixed-line-ending
args: [ --fix=lf ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
rev: v0.16.3
hooks:
# Run the linter.
- id: ruff-check
@@ -35,7 +35,7 @@ repos:
# Run the formatter.
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
rev: v2.4.3
hooks:
- id: codespell
exclude: >
@@ -46,7 +46,7 @@ repos:
args: [ --check-filenames, --check-hidden, --ignore-words=ignore.txt ]
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.37
rev: v0.9.39
hooks:
- id: pymarkdown
exclude: ^(lm_eval/tasks/.*|docs/footguns\.md)$