Enable loading data sets from files for custom tasks #3700
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v*-release | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| run_tests: | |
| name: Run tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Cache Hugging Face models | |
| uses: actions/cache@v4 | |
| with: | |
| path: cache/models | |
| key: hf-models-${{ runner.os }}-${{ github.ref }} | |
| restore-keys: hf-models-${{ runner.os }}- | |
| - name: Cache Hugging Face datasets | |
| uses: actions/cache@v4 | |
| with: | |
| path: cache/datasets | |
| key: hf-datasets-${{ runner.os }}-${{ github.ref }} | |
| restore-keys: hf-datasets-${{ runner.os }}- | |
| - name: Cache uv virtual environment | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: uv-env-${{ runner.os }}-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: uv-env-${{ runner.os }}- | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Install the project | |
| run: uv sync --extra dev | |
| - name: Ensure cache directories exist | |
| run: mkdir -p cache/models cache/datasets | |
| - name: Run tests | |
| env: | |
| HF_TEST_TOKEN: ${{ secrets.HF_TEST_TOKEN }} | |
| HF_HOME: "cache/models" | |
| HF_DATASETS_CACHE: "cache/datasets" | |
| run: uv run pytest -x --disable-pytest-warnings |