[cli] ensure UTF-8 encoding when writing project files
#1034
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| release: | |
| types: [ published ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests: | |
| name: pytest | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Every supported Python version, on the cheapest runner. | |
| - { os: ubuntu-latest, python-version: '3.10' } | |
| - { os: ubuntu-latest, python-version: '3.11' } | |
| - { os: ubuntu-latest, python-version: '3.12' } | |
| - { os: ubuntu-latest, python-version: '3.13' } | |
| - { os: ubuntu-latest, python-version: '3.14' } | |
| # Min/max Python only on macOS/Windows, to catch OS-specific issues. | |
| - { os: macos-latest, python-version: '3.10' } | |
| - { os: macos-latest, python-version: '3.14' } | |
| - { os: windows-latest, python-version: '3.10' } | |
| - { os: windows-latest, python-version: '3.14' } | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run tests | |
| run: uv run pytest | |
| coverage: | |
| name: coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run tests with coverage | |
| run: uv run pytest --cov --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run ruff check | |
| run: uv run ruff check . | |
| - name: Run ruff format | |
| run: uv run ruff format --check . | |
| - name: Run ty | |
| run: uv run ty check |