Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uv in the project CI #286

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- uses: pypa/[email protected].1
- uses: pypa/[email protected].3
with:
attestations: true
Original file line number Diff line number Diff line change
Expand Up @@ -55,39 +55,28 @@ jobs:
- "3.12"
- "3.13"
include:
- { script: "test:dependencies", python-version: "3.12" }
- { script: "typing:check", python-version: "3.12" }
- { script: "test:dependencies", python-version: "3.x" }
- { script: "typing:check", python-version: "3.x" }

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip

- name: Upgrade pip
run: |
pip install pip
pip --version

- name: Upgrade pip in virtual environments
shell: python
run: |
import os
import pip

with open(os.environ["GITHUB_ENV"], mode="a") as io:
print(f"VIRTUALENV_PIP={pip.__version__}", file=io)
- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.18"

- name: Install Hatch
run: |
pipx install hatch
uv tool install hatch
hatch --version

- name: Run tests
env:
HATCH_PYTHON: ${{ matrix.python-version }}
HATCH_PYTHON: ${{ steps.setup-python.outputs.python-path }}
HATCH_VERBOSE: "1"
[%- for env in passenv %]
[[ env ]]: ${{ secrets.[[ env ]] }}
Expand All @@ -107,6 +96,6 @@ jobs:
with:
python-version: "3.x"
- uses: pre-commit/[email protected]
- uses: pre-commit-ci/[email protected].2
- uses: pre-commit-ci/[email protected].3
if: always()
[%- endif %]