Skip to content

Commit bf5a96f

Browse files
committed
ci(tests,docs): poetry -> uv
1 parent d58a900 commit bf5a96f

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

.github/workflows/docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ jobs:
3333
if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
3434
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
3535

36-
- name: Install poetry
36+
- name: Install uv
3737
if: env.PUBLISH == 'true'
38-
run: pipx install "poetry==1.8.4"
38+
run: curl -LsSf https://astral.sh/uv/0.3.3/install.sh | sh
3939

4040
- name: Set up Python ${{ matrix.python-version }}
4141
if: env.PUBLISH == 'true'
4242
uses: actions/setup-python@v5
4343
with:
4444
python-version: ${{ matrix.python-version }}
45-
cache: 'poetry'
45+
cache: 'pip'
4646

4747
- name: Install dependencies [w/ docs]
4848
if: env.PUBLISH == 'true'
49-
run: poetry install --with=docs,lint
49+
run: uv pip install --editable '.[docs,lint]'
5050

5151
- name: Build documentation
5252
if: env.PUBLISH == 'true'
5353
run: |
54-
pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd
54+
pushd docs; make SPHINXBUILD='uv run sphinx-build' html; popd
5555
5656
- name: Push documentation to S3
5757
if: env.PUBLISH == 'true'

.github/workflows/tests.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,42 @@ jobs:
1919
python-version: ['3.9', '3.13']
2020
steps:
2121
- uses: actions/checkout@v4
22-
- name: Install poetry
23-
run: pipx install "poetry==1.8.4"
22+
23+
- name: Install uv
24+
# run: pip install "uv==0.3.3"
25+
# Install a specific uv version using the installer
26+
run: curl -LsSf https://astral.sh/uv/0.3.3/install.sh | sh
2427

2528
- name: Set up Python ${{ matrix.python-version }}
2629
uses: actions/setup-python@v5
2730
with:
2831
python-version: ${{ matrix.python-version }}
29-
cache: 'poetry'
32+
cache: 'pip'
3033

3134
- name: Install dependencies
32-
run: poetry install --with=docs,test,coverage,lint
35+
run: uv pip install --editable '.[docs,test,coverage,lint]'
3336

3437
- name: Lint with ruff check
35-
run: poetry run ruff check .
38+
run: uv run ruff check .
3639

3740
- name: Format with ruff
38-
run: poetry run ruff format . --check
41+
run: uv run ruff format . --check
3942

4043
- name: Lint with mypy
41-
run: poetry run mypy .
44+
run: uv run mypy .
4245

4346
- name: Print python versions
4447
run: |
4548
python -V
46-
poetry run python -V
49+
uv run python -V
4750
4851
- name: Test with pytest
49-
run: poetry run py.test --cov=./ --cov-append --cov-report=xml
52+
run: uv run py.test --cov=./ --cov-append --cov-report=xml
5053
env:
5154
COV_CORE_SOURCE: .
5255
COV_CORE_CONFIG: .coveragerc
5356
COV_CORE_DATAFILE: .coverage.eager
57+
5458
- uses: codecov/codecov-action@v4
5559
with:
5660
token: ${{ secrets.CODECOV_TOKEN }}
@@ -67,18 +71,20 @@ jobs:
6771
steps:
6872
- uses: actions/checkout@v4
6973

70-
- name: Install poetry
71-
run: pipx install "poetry==1.8.4"
74+
- name: Install uv
75+
# run: pip install "uv==0.3.3"
76+
# Install a specific uv version using the installer
77+
run: curl -LsSf https://astral.sh/uv/0.3.3/install.sh | sh
7278

7379
- name: Set up Python ${{ matrix.python-version }}
7480
uses: actions/setup-python@v5
7581
with:
7682
python-version: ${{ matrix.python-version }}
77-
cache: 'poetry'
83+
cache: 'pip'
7884

7985
- name: Build package
8086
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
81-
run: poetry build
87+
run: uv build
8288

8389
- name: Publish package
8490
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

0 commit comments

Comments
 (0)