This repository was archived by the owner on May 4, 2025. It is now read-only.
Bump astral-sh/setup-uv from 5 to 6 #101
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: Test | |
| on: push | |
| concurrency: | |
| group: tests-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| tests: | |
| name: ${{ matrix.os }} / ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.image }} | |
| strategy: | |
| matrix: | |
| os: | |
| - Ubuntu | |
| python-version: | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| include: | |
| - os: Ubuntu | |
| image: ubuntu-latest | |
| - os: Windows | |
| image: windows-latest | |
| python-version: "3.9" | |
| - os: Windows | |
| image: windows-latest | |
| python-version: "3.13" | |
| - os: macOS | |
| image: macos-latest | |
| python-version: "3.9" | |
| - os: macOS | |
| image: macos-latest | |
| python-version: "3.13" | |
| fail-fast: false | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Check lock file | |
| run: uv lock --locked | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Run pytest | |
| run: uv run pytest | |
| release-draft: | |
| name: Draft Release | |
| needs: tests | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Build Project | |
| run: uv build | |
| - name: Create Draft Release | |
| env: | |
| TAG_NAME: ${{ github.ref_name }} | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release create "$TAG_NAME" \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| --title "${GITHUB_REPOSITORY#*/} ${TAG_NAME#v}" \ | |
| --generate-notes \ | |
| --draft \ | |
| dist/*.tar.gz dist/*.whl |