Improve type annotation of registry with generics #60
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
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: pytest | |
| on: | |
| # Trigger the workflow on push to main or any pull request | |
| push: | |
| branches: ["main", "develop"] | |
| pull_request: | |
| types: ["opened", "synchronize"] | |
| jobs: | |
| main: | |
| strategy: | |
| matrix: | |
| platform: ["ubuntu-latest", "windows-latest"] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| pytest_marker: | |
| - null | |
| - "metrics_bertscore" | |
| - "metrics_bleurt" | |
| - "metrics_xcometlite" | |
| - "metrics_metricx24" | |
| - "metrics_metricx23" | |
| - "metrics_metricx23qe" | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install | |
| - name: Install the project | |
| run: uv sync --all-extras --dev --index torch=https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match | |
| - name: Test with pytest | |
| run: | | |
| uv run hf auth login --token ${{ secrets.HUGGINGFACE_TOKEN }} | |
| uv run pytest ${{ matrix.pytest_marker && format('-m {0}', matrix.pytest_marker) || '' }} |