Repository navigation
test: encoding detection fails on short texts #11
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: Python application | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["master", "devel"] | |
| pull_request: | |
| branches: ["master", "devel"] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/master' || github.sha }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| DEFAULT_PYTHON: "3.13" | |
| UV_LINK_MODE: "copy" | |
| jobs: | |
| build: | |
| name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| include: | |
| - os: windows-latest | |
| python-version: "3.13" # Windows runner is too slow | |
| steps: | |
| - name: ✅ Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: 📦 Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| **/uv.lock | |
| **/pyproject.toml | |
| - name: 🐍 Install the project | |
| run: uv sync --all-extras --no-dev --group test | |
| - name: ✅ Run tests | |
| run: | | |
| uv run --no-dev --group test pytest --cov --cov-report term-missing:skip-covered --cov-report xml |