Use UTF16 flag for non-ascii display text #92
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 variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Test from sdist and wheels | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| inputs: | |
| allow_deploy: | |
| description: "Deploy to PyPI" | |
| required: true | |
| type: boolean | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.11 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip build | |
| - name: Build dists | |
| run: python -m build | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'dists' | |
| path: 'dist/*' | |
| test: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Note: We're exporting the lockfile without the project or its direct dependencies included. | |
| # Then we avoid using uv elsewhere to ensure we're testing the installed package | |
| # and not the development environment. | |
| - name: Export Lockfile | |
| run: uv export --frozen --only-group test --only-group doc --format requirements-txt -o requirements.txt | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: 'dists' | |
| path: dist | |
| - name: Install wheel | |
| run: pip install dist/*.whl | |
| - name: Test built wheel | |
| run: py.test -o testpaths=tests | |
| - name: Install sdist | |
| run: | | |
| pip uninstall -y tslumd | |
| pip install dist/*.tar.gz | |
| - name: Test built sdist | |
| run: py.test -o testpaths=tests | |
| deploy: | |
| needs: test | |
| if: ${{ success() && inputs.allow_deploy }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: 'dists' | |
| path: dist | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |