Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BioBlend tests #18975

Merged
merged 7 commits into from
Oct 11, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions .github/workflows/bioblend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: Tests
on:
pull_request:
paths:
- "lib/galaxy/webapps/galaxy/api/**"
arash77 marked this conversation as resolved.
Show resolved Hide resolved
workflow_dispatch:

concurrency:
group: test-${{ github.ref }}
arash77 marked this conversation as resolved.
Show resolved Hide resolved
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
arash77 marked this conversation as resolved.
Show resolved Hide resolved
services:
postgres:
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
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: py313
galaxy_version: dev
# 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
arash77 marked this conversation as resolved.
Show resolved Hide resolved
steps:
- run: git clone https://github.com/galaxyproject/bioblend
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.tox_env }}-${{ matrix.galaxy_version }}
- 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@v5
with:
python-version: ${{ steps.get_bioblend_python_version.outputs.bioblend_python_version }}
- name: Install tox
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install 'tox>=1.8.0' 'virtualenv>=20.0.14'
arash77 marked this conversation as resolved.
Show resolved Hide resolved
- 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
arash77 marked this conversation as resolved.
Show resolved Hide resolved
- name: Set up Python for Galaxy
uses: actions/setup-python@v5
with:
python-version: ${{ steps.get_galaxy_python_version.outputs.galaxy_python_version }}
- name: Run tests
env:
PGPASSWORD: postgres
PGPORT: 5432
PGHOST: localhost
run: |
# Create a PostgreSQL database for Galaxy. The default SQLite3 database makes test fail randomly because of "database locked" error.
createdb -U postgres galaxy
# Run ToolShed tests only once per Python version
if [ "${{ matrix.galaxy_version }}" = 'dev' ]; then
export BIOBLEND_TOOLSHED_URL=https://testtoolshed.g2.bx.psu.edu/
fi
# Install Galaxy
GALAXY_DIR=galaxy-${{ matrix.galaxy_version }}
git clone --depth=1 -b ${{ matrix.galaxy_version }} https://github.com/galaxyproject/galaxy $GALAXY_DIR
arash77 marked this conversation as resolved.
Show resolved Hide resolved
export DATABASE_CONNECTION=postgresql://postgres:@localhost/galaxy
./bioblend/run_bioblend_tests.sh -g $GALAXY_DIR -v python${{ steps.get_galaxy_python_version.outputs.galaxy_python_version }} -e ${{ matrix.tox_env }}
- name: The job has failed
if: ${{ failure() }}
run: |
cat galaxy-${{ matrix.galaxy_version }}/*.log
Loading