fix!: import WordPiece only if HAS_HF true to avoid general import bug #153
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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: Python Tests | |
| on: | |
| push: | |
| branches: [ "main", "rename-package" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| version: 0.9.17 | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install the project | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run tests | |
| # For example, using `pytest` | |
| run: uv run pytest tests |