Upgrade package transformers due to vulnerability #942
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "docs/**" | |
| - "*.md" | |
| pull_request: | |
| types: [opened, synchronize, reopened, edited] | |
| paths-ignore: | |
| - "docs/**" | |
| - "*.md" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Aggressive disk cleanup | |
| run: | | |
| sudo rm -rf /usr/local/lib/android | |
| docker system prune -af | |
| sudo apt-get clean | |
| sudo rm -rf /var/lib/apt/lists/* | |
| sudo rm -rf /tmp/* | |
| sudo rm -rf /var/tmp/* | |
| rm -rf ~/.cache/huggingface | |
| rm -rf ~/.cache/pip | |
| df -h | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: '' # disables pip cache | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install ".[dev]" | |
| - name: Free up space & Hugging Face cache | |
| run: | | |
| rm -rf ~/.cache/huggingface | |
| df -h | |
| - name: Test with pytest | |
| env: | |
| HF_HUB_DISABLE_CACHE: 1 # prevents cache from filling up runner disk | |
| run: | | |
| python -m pytest --exitfirst --verbose --failed-first --cov=. --color=yes --code-highlight=yes |