Skip to content

Commit

Permalink
ci: Use uv for all pip installs
Browse files Browse the repository at this point in the history
* Use 'uv pip' for all calls to 'pip install' in CI workflows.
   - c.f. https://github.com/astral-sh/uv/
* Use 'pipx run' over a Make command.
  • Loading branch information
matthewfeickert committed May 13, 2024
1 parent 2739e8e commit ef4e3f6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ jobs:
python-version: "3.10"
- name: "Install Python dependencies"
run: |
pip install --no-cache-dir --upgrade pip setuptools wheel
pip install --no-cache-dir --quiet ".[lint]"
pip list
python -m pip install --upgrade uv
uv pip install --system --upgrade pip setuptools wheel
uv pip install --system --quiet ".[lint]"
uv pip list --system
- name: "Check format"
run: |
make check
Expand All @@ -58,9 +59,10 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: "Install Python dependencies"
run: |
pip install --no-cache-dir --upgrade pip setuptools wheel
pip install --no-cache-dir --quiet ".[test]"
pip list
python -m pip install --upgrade uv
uv pip install --system --upgrade pip setuptools wheel
uv pip install --system --quiet ".[test]"
uv pip list --system
- name: "Test with pytest"
run: |
make test
7 changes: 4 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ jobs:
python-version: "3.10"
- name: "Install Python dependencies"
run: |
pip install --no-cache-dir --upgrade pip setuptools wheel
pip install --no-cache-dir --quiet ".[docs]"
pip list
python -m pip install --upgrade uv
uv pip install --system --upgrade pip setuptools wheel
uv pip install --system --quiet ".[docs]"
uv pip list --system
- name: "Build documentation"
run: |
make docs
8 changes: 1 addition & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: "Install Python dependencies"
run: |
pip install --no-cache-dir --upgrade pip setuptools wheel
pip install --no-cache-dir --upgrade build
pip install --no-cache-dir --quiet .
pip list
- name: "Build Python package"
run: |
make build
pipx run build --installer uv
- name: "Publish Python package"
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TESTS_FOLDER = "tests"
.PHONY: build
build:
@echo "Building package"
@python -m build --sdist --wheel --outdir dist .
@python -m build --installer uv .


.PHONY: check
Expand Down

0 comments on commit ef4e3f6

Please sign in to comment.