Add Tokenizer Comparison Script #424
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: Mistral Common CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| # we cancel all runs of previous commits in PR. On main we run the CI on all commits | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || 'no-pr' }} | |
| cancel-in-progress: ${{ github.event.pull_request.number != null }} | |
| jobs: | |
| build_lint_test: | |
| if: ${{ github.event.pull_request.draft != true }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # Support all LTS versions of Python | |
| python-version: [ | |
| "3.10", | |
| "3.11", | |
| "3.12", | |
| "3.13" | |
| ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Check uv lock | |
| run: | | |
| uv lock --check | |
| # Install | |
| - name: Install Dependencies | |
| run: | | |
| uv sync --frozen --all-extras --group dev | |
| # Ruff Linter | |
| - name: Ruff Linter | |
| run: | | |
| uv run ruff check . | |
| # Ruff Format | |
| - name: Ruff Format | |
| run: | | |
| uv run ruff format . --check | |
| # Mypy | |
| - name: Mypy Check | |
| run: | | |
| uv run mypy . | |
| # PyTest | |
| - name: Tests | |
| run: | | |
| uv run pytest --cov=mistral_common . --cov-report "xml:coverage.xml" | |
| # Doctests | |
| - name: Doctests | |
| run: | | |
| uv run pytest --doctest-modules ./src | |
| build_docs: | |
| if: ${{ github.event.pull_request.draft != true }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Dependencies | |
| run: | | |
| uv sync --frozen --all-extras --group docs | |
| - name: Build Docs | |
| run: | | |
| uv run mkdocs build --strict |