Use uv or tox to set up Python

instead of `actions/setup-python`.

Also:
- Drop caching Galaxy virtualenv (no time saving).
- Install doc dependencies in a virtual environment.
This commit is contained in:
Nicola Soranzo committed 2026-06-26 16:51:50 +01:00
1 parent df990161fb
commit 3788424644
29 files changed
+81 -231

No files matched your search

+3 -11
View File
@@ -52,20 +52,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-api
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Run tests
run: ./run_tests.sh --coverage --skip_flakey_fails -api lib/galaxy_test/api -- --num-shards=2 --shard-id=${{ matrix.chunk }}
working-directory: 'galaxy root'
+4 -8
View File
@@ -50,18 +50,14 @@ jobs:
- name: Calculate Python version for BioBlend from tox_env
id: get_bioblend_python_version
run: echo "bioblend_python_version=$(echo "${{ matrix.tox_env }}" | sed -e 's/^py\([3-9]\)\([0-9]\+\)/\1.\2/')" >> $GITHUB_OUTPUT
- name: Set up Python for BioBlend
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ steps.get_bioblend_python_version.outputs.bioblend_python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Install tox
run: uv tool install tox --with tox-uv
run: uv tool install --python ${BIOBLEND_PYTHON_VERSION} tox --with tox-uv
env:
BIOBLEND_PYTHON_VERSION: ${{ steps.get_bioblend_python_version.outputs.bioblend_python_version }}
- name: Set up Python for Galaxy
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.galaxy_python_version }}
run: uv python install ${{ matrix.galaxy_python_version }}
- name: Run tests
env:
PGPASSWORD: postgres
+1 -1
View File
@@ -85,7 +85,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: '3.12'
python-version: '3.14'
# https://stackoverflow.com/questions/59810838/how-to-get-the-short-sha-for-the-github-workflow
- name: Set outputs
id: commit
@@ -20,11 +20,12 @@ jobs:
- uses: actions/checkout@v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Install Python dependencies
run: uv pip install --system -r requirements.txt -r lib/galaxy/dependencies/pinned-test-requirements.txt
- name: Run tests
+2 -3
View File
@@ -41,11 +41,10 @@ jobs:
repository: galaxyproject/galaxy-test-data
path: galaxy-test-data
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Move test data
run: rsync -av --remove-source-files --exclude .git galaxy-test-data/ 'galaxy root/test-data/'
- name: Install planemo
+3 -11
View File
@@ -44,20 +44,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-api
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Run tests
run: ./run_tests.sh --coverage --skip_flakey_fails -cwl lib/galaxy_test/api/cwl -- -m "${{ matrix.marker }} and ${{ matrix.conformance-version }}"
working-directory: 'galaxy root'
+2 -7
View File
@@ -45,15 +45,10 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: uv tool install tox --with tox-uv
- name: Set database connection on PostgreSQL
+2 -3
View File
@@ -13,11 +13,10 @@ jobs:
- uses: actions/checkout@v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: '3.10'
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: '3.10'
- name: Update dependencies
run: make update-dependencies
- name: Create pull request
+4 -3
View File
@@ -36,11 +36,12 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- uses: nanasess/setup-chromedriver@v3
- name: Run tests
run: bash ./test/deployment/usegalaxystar.bash
+6 -4
View File
@@ -33,13 +33,15 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: uv pip install --system -r requirements.txt -r lib/galaxy/dependencies/dev-requirements.txt sphinxcontrib-simpleversioning
run: |
uv venv .venv
. .venv/bin/activate
uv pip install -r requirements.txt -r lib/galaxy/dependencies/dev-requirements.txt sphinxcontrib-simpleversioning
- name: Add Google Analytics to doc/source/conf.py
run: |
sed -i -e "/html_theme_options = {/a\
+2 -8
View File
@@ -35,16 +35,10 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
with:
python-version: ${{ matrix.python-version }}
- name: Restore client cache
uses: actions/cache@v5.0.5
with:
+3 -11
View File
@@ -48,20 +48,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-framework
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Run tests
run: GALAXY_TEST_USE_LEGACY_TOOL_API="${{ matrix.use-legacy-api }}" ./run_tests.sh --coverage --framework-tools
working-directory: 'galaxy root'
+3 -11
View File
@@ -48,20 +48,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-framework
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Run tests
run: ./run_tests.sh --coverage --framework-workflows
working-directory: 'galaxy root'
+3 -11
View File
@@ -57,20 +57,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-integration
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Install Apptainer's singularity
uses: eWaterCycle/setup-apptainer@v2
- name: Run tests
+3 -11
View File
@@ -59,20 +59,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-integration-selenium
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Restore client cache
uses: actions/cache@v5.0.5
with:
+3 -14
View File
@@ -40,22 +40,11 @@ jobs:
- uses: actions/checkout@v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: uv tool install tox --with tox-uv
- name: Run linting
run: tox -e lint
- name: Run docstring linting
run: tox -e lint_docstring_include_list
- name: Run mypy checks
run: tox -e mypy
- name: Run format checks
run: tox -e format
run: tox -e lint,lint_docstring_include_list,mypy,format
+3 -11
View File
@@ -39,20 +39,12 @@ jobs:
uses: pnpm/action-setup@v6
with:
package_json_file: 'galaxy root/client/package.json'
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-api
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Install dependencies
run: ./scripts/common_startup.sh --dev-wheels --skip-client-build
working-directory: 'galaxy root'
+3 -11
View File
@@ -40,20 +40,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-framework
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Run tests
run: ./run_tests.sh --coverage --main_tools
working-directory: 'galaxy root'
+2 -7
View File
@@ -29,15 +29,10 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
with:
python-version: ${{ matrix.python-version }}
- name: Install Apptainer's singularity
uses: eWaterCycle/setup-apptainer@v2
- name: Install tox
+3 -11
View File
@@ -46,20 +46,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-performance
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Run tests
run: ./run_tests.sh --ci_test_metrics --structured_data_html --structured_data_report_file "test.json" --skip_flakey_fails -api lib/galaxy_test/performance
working-directory: 'galaxy root'
+3 -11
View File
@@ -58,20 +58,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-playwright
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Restore client cache
uses: actions/cache@v5.0.5
with:
+1 -3
View File
@@ -45,13 +45,11 @@ jobs:
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || '' }}
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: '3.10'
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: false
python-version: '3.10'
- name: Install script dependencies
run: uv tool install galaxy-release-util
- name: Build Python packages
+3 -11
View File
@@ -59,20 +59,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-selenium
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Restore client cache
uses: actions/cache@v5.0.5
with:
+2 -3
View File
@@ -25,11 +25,10 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install ffmpeg
run: sudo apt-get update && sudo apt-get -y install ffmpeg
- name: Install tox
@@ -29,11 +29,10 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Apptainer's singularity
uses: eWaterCycle/setup-apptainer@v2
- name: Install ffmpeg
+3 -11
View File
@@ -68,20 +68,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-playwright
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Install dependencies
run: ./scripts/common_startup.sh --dev-wheels --skip-client-build
working-directory: 'galaxy root'
+3 -11
View File
@@ -40,20 +40,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-toolshed
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Install dependencies
run: ./scripts/common_startup.sh --dev-wheels --skip-client-build
working-directory: 'galaxy root'
+3 -11
View File
@@ -40,20 +40,12 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache galaxy venv
uses: actions/cache@v5.0.5
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-unit-postgres
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Run migration tests
run: ./run_tests.sh -unit test/unit/data/model/migrations/test_migrations.py
working-directory: 'galaxy root'
+2 -7
View File
@@ -29,15 +29,10 @@ jobs:
with:
path: 'galaxy root'
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
with:
python-version: ${{ matrix.python-version }}
- name: Install ffmpeg
run: sudo apt-get update && sudo apt-get -y install ffmpeg
- name: Install tox