[misc] fix ci (#7441)

* fix ci

* improve ci
This commit is contained in:
hoshi-hiyouga
2025-03-23 21:09:35 +08:00
committed by GitHub
parent 304796b803
commit 3aa4f32e9c
4 changed files with 19 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version:
python:
- "3.9"
- "3.10"
- "3.11"
@@ -34,6 +34,10 @@ jobs:
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
OS_NAME: ${{ matrix.os }}
@@ -45,7 +49,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}
cache: "pip"
cache-dependency-path: "setup.py"
@@ -54,6 +58,12 @@ jobs:
python -m pip install --upgrade pip
python -m pip install ".[torch,dev]"
- name: Cache files
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/huggingface
key: huggingface-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('tests/version.txt') }}
- name: Check quality
run: |
make style && make quality
@@ -65,3 +75,5 @@ jobs:
- name: Test with pytest
run: |
make test
env:
HF_HOME: ${{ runner.temp }}/huggingface