Skip to content

Commit 56c7e93

Browse files
committed
Use uv commands in CI
1 parent 892d305 commit 56c7e93

File tree

2 files changed

+15
-32
lines changed

2 files changed

+15
-32
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,23 @@ jobs:
3232
uses: actions/setup-python@v5
3333
with:
3434
python-version: "3.12"
35+
3536
- name: Install dependencies
36-
run: |
37-
python -m pip install uv
38-
uv venv
39-
source .venv/bin/activate
40-
uv sync
37+
uses: astral-sh/setup-uv@v5
38+
4139
# Update output format to enable automatic inline annotations.
4240
- name: Run Ruff
4341
run: |
44-
ruff check --output-format=github python/
45-
ruff format --check python/
42+
uv run ruff check --output-format=github python/
43+
uv run ruff format --check python/
4644
4745
generate-license:
4846
runs-on: ubuntu-latest
4947
steps:
5048
- uses: actions/checkout@v4
51-
- uses: actions-rs/toolchain@v1
52-
with:
53-
profile: minimal
54-
toolchain: stable
55-
override: true
49+
- uses: dtolnay/rust-toolchain@stable
5650
- name: Generate license file
57-
run: python ./dev/create_license.py
51+
run: uv run python ./dev/create_license.py
5852
- uses: actions/upload-artifact@v4
5953
with:
6054
name: python-wheel-license
@@ -76,7 +70,7 @@ jobs:
7670
with:
7771
python-version: ${{ matrix.python-version }}
7872

79-
- uses: actions-rs/toolchain@v1
73+
- uses: dtolnay/rust-toolchain@stable
8074
with:
8175
toolchain: stable
8276

@@ -94,14 +88,10 @@ jobs:
9488
repo-token: ${{ secrets.GITHUB_TOKEN }}
9589

9690
- name: Install dependencies and build
97-
run: |
98-
python -m pip install uv
99-
uv venv
100-
.venv\Scripts\activate
101-
uv sync
91+
uses: astral-sh/setup-uv@v5
10292

10393
- name: Build Python package
104-
run: maturin build --release --strip --features substrait
94+
run: uv run maturin build --release --strip --features substrait
10595

10696
- name: List Windows wheels
10797
if: matrix.os == 'windows-latest'
@@ -135,9 +125,7 @@ jobs:
135125
with:
136126
python-version: ${{ matrix.python-version }}
137127

138-
- uses: actions-rs/toolchain@v1
139-
with:
140-
toolchain: stable
128+
- uses: dtolnay/rust-toolchain@stable
141129

142130
- run: rm LICENSE.txt
143131
- name: Download LICENSE.txt
@@ -153,15 +141,10 @@ jobs:
153141
repo-token: ${{ secrets.GITHUB_TOKEN }}
154142

155143
- name: Install dependencies and build
156-
run: |
157-
python -m pip install uv
158-
uv venv
159-
source .venv/bin/activate
160-
uv sync
144+
uses: astral-sh/setup-uv@v5
161145

162146
- name: Build Python package
163-
run: |
164-
maturin build --release --strip --features substrait
147+
run: uv run maturin build --release --strip --features substrait
165148

166149
- name: List Mac wheels
167150
run: find target/wheels/

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
repos:
1919
- repo: https://github.com/rhysd/actionlint
20-
rev: v1.6.23
20+
rev: v1.7.6
2121
hooks:
22-
- id: actionlint-docker
22+
- id: actionlint-docker
2323
- repo: https://github.com/astral-sh/ruff-pre-commit
2424
# Ruff version.
2525
rev: v0.3.0

0 commit comments

Comments
 (0)