Skip to content

Commit 5d5c34d

Browse files
committed
chore: unify uv usage in workflows
Some part of workflows did not utilize `uv` properly. Also, version for `astral-sh/setup-uv` was not unified. Also, bump tox dependency, because the old version of `tox` and `tox-uv` do not contain the latest version of `uv`.
1 parent 63c7a21 commit 5d5c34d

File tree

9 files changed

+171
-84
lines changed

9 files changed

+171
-84
lines changed

.github/workflows/build-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v4
3737
- name: Install uv
38-
uses: astral-sh/setup-uv@v5
38+
uses: astral-sh/setup-uv@v6
3939
- name: Build ${{ matrix.component }}
4040
run: |
4141
if [ "${{ matrix.component }}" = "gooddata-api-client" ]; then

.github/workflows/bump-version.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
token: ${{ secrets.TOKEN_GITHUB_YENKINS_ADMIN }} # needed to push to the protected branch
3131

3232
- name: Install uv
33-
uses: astral-sh/setup-uv@v5
33+
uses: astral-sh/setup-uv@v6
3434

3535
- name: Install dependencies
3636
run: |
@@ -39,12 +39,12 @@ jobs:
3939
- name: Bump version
4040
id: bump
4141
run: |
42-
NEW_VERSION=$(python ./scripts/bump_version.py ${{ github.event.inputs.bump_type }})
42+
NEW_VERSION=$(uv run python ./scripts/bump_version.py ${{ github.event.inputs.bump_type }})
4343
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
4444
4545
- name: Bump version in documentation
4646
run: |
47-
python scripts/bump_doc_dependencies.py ${{ steps.bump.outputs.new_version }}
47+
uv run python ./scripts/bump_doc_dependencies.py ${{ steps.bump.outputs.new_version }}
4848
4949
- name: Bump version in codebase
5050
run: |

.github/workflows/dev-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
with:
3030
ref: ${{ inputs.BRANCH_NAME }}
3131
- name: Install uv
32-
uses: astral-sh/setup-uv@v5
32+
uses: astral-sh/setup-uv@v6
3333
- name: Install dependencies
3434
run: |
3535
uv sync --group release
3636
- name: Bump to dev
37-
run: tbump --only-patch --non-interactive $(./scripts/next_dev.sh)
37+
run: uv run tbump --only-patch --non-interactive $(./scripts/next_dev.sh)
3838
- name: Build ${{ matrix.component }}
3939
run: |
4040
if [ "${{ matrix.component }}" = "gooddata-api-client" ]; then

.github/workflows/rw-python-tests.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ jobs:
3737
python-version: 3.13
3838
- name: Install dependencies
3939
run: |
40-
uv venv
41-
uv pip install --group lint
40+
uv sync --group lint
4241
- name: pep8 and formatting check
4342
run: |
4443
make format
@@ -49,13 +48,10 @@ jobs:
4948
- name: Checkout
5049
uses: actions/checkout@v4
5150
- name: Set up python 3.13
52-
uses: actions/setup-python@v5
53-
with:
54-
python-version-file: '.python-version'
51+
uses: astral-sh/setup-uv@v6
5552
- name: Install dependencies
5653
run: |
57-
python -m pip install uv
58-
uv pip install --group tox --group type --system
54+
uv sync --group tox --group type
5955
- name: mypy check
6056
run: |
6157
make mypy

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# (C) 2021 GoodData Corporation
22
ARG PY_TAG
3-
FROM python:${PY_TAG}
3+
FROM ghcr.io/astral-sh/uv:0.9.5-python${PY_TAG}
44

55
ARG PY_TAG
66
ARG ENV_TAG
@@ -27,10 +27,10 @@ RUN set -x \
2727
&& true
2828

2929
# install tox
30-
ENV PYTHON_TOX_VERSION=4.14.1
31-
ENV PYTHON_TOX_UV_VERSION=1.7.0
30+
COPY pyproject.toml /tmp/pyproject.toml
3231
RUN set -x \
33-
&& pip3 install uv tox==${PYTHON_TOX_VERSION} tox-uv==${PYTHON_TOX_UV_VERSION}\
32+
&& uv pip install --system --project /tmp --group tox \
33+
&& rm /tmp/pyproject.toml \
3434
&& true
3535

3636
COPY .docker/entrypoint.sh /entrypoint.sh
@@ -39,7 +39,7 @@ WORKDIR /data
3939
LABEL image_name="GoodData Python SDK test image with python, tox and make"
4040
# LABEL maintainer="TigerTeam <tiger@gooddata.com>"
4141
LABEL git_repository_url="https://github.com/gooddata/gooddata-python-sdk/"
42-
LABEL parent_image="python:${PY_TAG}"
42+
LABEL parent_image="ghcr.io/astral-sh/uv:0.9.5-python${PY_TAG}"
4343

4444
ENTRYPOINT ["/entrypoint.sh"]
4545
CMD ["make", "test"]

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ test:
8282
.PHONY: release
8383
release:
8484
if [ -z "$(VERSION)" ]; then echo "Usage: 'make release VERSION=X.Y.Z'"; false; else \
85-
tbump $(VERSION) --no-tag --no-push ; fi
85+
uv run tbump $(VERSION) --no-tag --no-push ; fi
8686

8787
.PHONY: release-ci
8888
release-ci:
8989
if [ -z "$(VERSION)" ]; then echo "Usage: 'make release-ci VERSION=X.Y.Z'"; false; else \
90-
tbump $(VERSION) --only-patch --non-interactive ; fi
90+
uv run tbump $(VERSION) --only-patch --non-interactive ; fi
9191

9292
.PHONY: check-copyright
9393
check-copyright:
94-
./scripts/check_copyright.py FOLDER
94+
uv run ./scripts/check_copyright.py FOLDER
9595

9696
.PHONY: docs
9797
docs:

project_common.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ format-fix:
3838

3939
.PHONY: mypy
4040
mypy:
41-
tox $(TOX_FLAGS) -e mypy
41+
uv run tox $(TOX_FLAGS) -e mypy
4242

4343
.PHONY: test
4444
test:
45-
tox -v $(TOX_FLAGS) $(LOCAL_TEST_ENVS) $(LOCAL_ADD_ARGS)
45+
uv run tox -v $(TOX_FLAGS) $(LOCAL_TEST_ENVS) $(LOCAL_ADD_ARGS)
4646

4747
.PHONY: test-ci
4848
test-ci:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ release = [
4848
"tomlkit>=0.11"
4949
]
5050
tox = [
51-
"tox~=4.26.0",
52-
"tox-uv~=1.26.1"
51+
"tox~=4.31.0",
52+
"tox-uv~=1.29.0"
5353
]
5454

5555
[tool.ruff]

0 commit comments

Comments
 (0)