Skip to content

Commit

Permalink
Pin Ubuntu to 22.04 for Galaxy releases using Python 3.7
Browse files Browse the repository at this point in the history
The ubuntu-latest runner label is moving to 24.04, see
https://github.blog/changelog/2024-09-25-actions-new-images-and-ubuntu-latest-changes/

Fix the following error at the setup-python step:

```
Version 3.7 was not found in the local cache
Error: The version '3.7' with architecture 'x64' was not found for Ubuntu 24.04.
The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
```
  • Loading branch information
nsoranzo committed Oct 11, 2024
1 parent 93bae92 commit 062a3c9
Showing 1 changed file with 75 additions and 48 deletions.
123 changes: 75 additions & 48 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,88 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
tox_env: [py38]
galaxy_version:
- dev
- release_24.1
- release_24.0
- release_23.2
- release_23.1
- release_23.0
- release_22.05
- release_22.01
- release_21.09
- release_21.05
- release_21.01
- release_20.09
- release_20.05
- release_20.01
- release_19.09
- release_19.05
include:
- os: ubuntu-latest
tox_env: py38
galaxy_version: dev
galaxy_python_version: '3.8'
- os: ubuntu-latest
tox_env: py38
galaxy_version: release_24.1
galaxy_python_version: '3.8'
- os: ubuntu-latest
tox_env: py38
galaxy_version: release_24.0
galaxy_python_version: '3.8'
# Python 3.7 is not available via setup-python on ubuntu >=24.04
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_23.2
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_23.1
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_23.0
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_22.05
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_22.01
galaxy_python_version: '3.7'
# The minimum Python supported version by the following releases is
# 3.6, but it is EOL
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_21.09
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_21.05
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_21.01
galaxy_python_version: '3.7'
# The minimum Python supported version by the following releases is
# 3.5, but it is EOL
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_20.09
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_20.05
galaxy_python_version: '3.7'
# The minimum Python supported version by the following releases is
# 2.7, but it is EOL
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_20.01
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_19.09
galaxy_python_version: '3.7'
- os: ubuntu-22.04
tox_env: py38
galaxy_version: release_19.05
galaxy_python_version: '3.7'
- os: ubuntu-latest
tox_env: py313
galaxy_version: dev
galaxy_python_version: '3.8'
# Cannot test on macOS because service containers are not supported
# yet: https://github.community/t/github-actions-services-available-on-others-vms/16916
# - os: macos-latest
# tox_env: py38
# galaxy_version: dev
# galaxy_python_version: '3.8'
steps:
- uses: actions/checkout@v4
- name: Cache pip dir
Expand All @@ -75,37 +129,10 @@ jobs:
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install 'tox>=1.8.0' 'virtualenv>=20.0.14'
- name: Determine Python version for Galaxy
id: get_galaxy_python_version
run: |
case ${{ matrix.galaxy_version }} in
release_19.05 | release_19.09 | release_20.0? )
# The minimum Python version supported by the 19.05 and 19.09
# releases is 2.7, but virtualenv dropped support for creating
# Python <3.7 environments in v20.22.0 .
# The minimum Python version supported by the 20.0* releases is
# 3.5, but the setup-python GitHub action dropped support for
# Python 3.5 and 3.6 on Ubuntu 22.04, see
# https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
galaxy_python_version=3.7
;;
release_21.0? )
# The minimum Python supported version by these releases is 3.6,
# but same as above.
galaxy_python_version=3.7
;;
release_22.0? | release_23.? )
galaxy_python_version=3.7
;;
release_24.? | dev )
galaxy_python_version=3.8
;;
esac
echo "galaxy_python_version=$galaxy_python_version" >> $GITHUB_OUTPUT
- name: Set up Python for Galaxy
uses: actions/setup-python@v5
with:
python-version: ${{ steps.get_galaxy_python_version.outputs.galaxy_python_version }}
python-version: ${{ matrix.galaxy_python_version }}
- name: Run tests
env:
PGPASSWORD: postgres
Expand All @@ -122,7 +149,7 @@ jobs:
GALAXY_DIR=galaxy-${{ matrix.galaxy_version }}
git clone --depth=1 -b ${{ matrix.galaxy_version }} https://github.com/galaxyproject/galaxy $GALAXY_DIR
export DATABASE_CONNECTION=postgresql://postgres:@localhost/galaxy
./run_bioblend_tests.sh -g $GALAXY_DIR -v python${{ steps.get_galaxy_python_version.outputs.galaxy_python_version }} -e ${{ matrix.tox_env }}
./run_bioblend_tests.sh -g $GALAXY_DIR -v python${{ matrix.galaxy_python_version }} -e ${{ matrix.tox_env }}
- name: The job has failed
if: ${{ failure() }}
run: |
Expand Down

0 comments on commit 062a3c9

Please sign in to comment.