mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #11410 from bernt-matthias/topic/fix-configfile-20.05
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: testing
|
||||
name: testing
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: test
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: test
|
||||
spec:
|
||||
containers:
|
||||
- image: postgres:12
|
||||
name: postgres
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
env:
|
||||
- name: POSTGRES_DB
|
||||
value: postgres
|
||||
- name: POSTGRES_USER
|
||||
value: postgres
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: postgres
|
||||
- image: rabbitmq
|
||||
name: rabbitmq
|
||||
ports:
|
||||
- containerPort: 5672
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
kubectl apply -f "$SCRIPTDIR/deployment.yaml"
|
||||
kubectl expose deployment testing --type=LoadBalancer --name=testing-service
|
||||
|
||||
CLUSTER_IP=$(kubectl get service testing-service -o jsonpath='{.spec.clusterIP}')
|
||||
GALAXY_TEST_DBURI="postgresql://postgres:postgres@${CLUSTER_IP}:5432/galaxy?client_encoding=utf-8"
|
||||
GALAXY_TEST_AMQP_URL="amqp://${CLUSTER_IP}:5672)//"
|
||||
export GALAXY_TEST_DBURI
|
||||
export GALAXY_TEST_AMQP_URL
|
||||
@@ -6,14 +6,15 @@ env:
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
python-version: ['3.7']
|
||||
subset: ['upload_datatype', 'extended_metadata', 'kubernetes', 'not (upload_datatype or extended_metadata or kubernetes)']
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:11
|
||||
image: postgres:13
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
@@ -25,36 +26,48 @@ jobs:
|
||||
ports:
|
||||
- 5672:5672
|
||||
steps:
|
||||
- name: Prune unused docker image, volumes and containers
|
||||
run: docker system prune -a -f
|
||||
- name: Clean dotnet folder for space
|
||||
if: matrix.subset == 'kubernetes'
|
||||
run: rm -Rf /usr/share/dotnet
|
||||
- name: Setup Minikube
|
||||
if: matrix.subset == 'kubernetes'
|
||||
id: minikube
|
||||
uses: CodingNagger/minikube-setup-action@v1.0.3
|
||||
with:
|
||||
minikube-version: "1.9.0-0_amd64"
|
||||
- name: Launch Minikube
|
||||
if: matrix.subset == 'kubernetes'
|
||||
run: eval ${{ steps.minikube.outputs.launcher }}
|
||||
- name: Check pods
|
||||
if: matrix.subset == 'kubernetes'
|
||||
run: |
|
||||
kubectl get pods
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
path: 'galaxy root'
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Cache pip dir
|
||||
uses: actions/cache@v1
|
||||
id: pip-cache
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
|
||||
- name: Run tests
|
||||
run: './run_tests.sh -integration test/integration -- -k "${{ matrix.subset }}"'
|
||||
working-directory: 'galaxy root'
|
||||
- name: Prune unused docker image, volumes and containers
|
||||
run: docker system prune -a -f
|
||||
- name: Clean dotnet folder for space
|
||||
if: matrix.subset == 'kubernetes'
|
||||
run: rm -Rf /usr/share/dotnet
|
||||
- name: Setup Minikube
|
||||
if: matrix.subset == 'kubernetes'
|
||||
id: minikube
|
||||
uses: CodingNagger/minikube-setup-action@v1.0.3
|
||||
with:
|
||||
minikube-version: "1.9.0-0_amd64"
|
||||
- name: Launch Minikube
|
||||
if: matrix.subset == 'kubernetes'
|
||||
run: eval ${{ steps.minikube.outputs.launcher }}
|
||||
- name: Check pods
|
||||
if: matrix.subset == 'kubernetes'
|
||||
run: |
|
||||
kubectl get pods
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
path: 'galaxy root'
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Cache pip dir
|
||||
uses: actions/cache@v1
|
||||
id: pip-cache
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
|
||||
- name: Run tests
|
||||
if: matrix.subset != 'kubernetes'
|
||||
run: './run_tests.sh -integration test/integration -- -k "${{ matrix.subset }}"'
|
||||
working-directory: 'galaxy root'
|
||||
- name: Run tests
|
||||
if: matrix.subset == 'kubernetes'
|
||||
run: |
|
||||
. .ci/minikube-test-setup/start_services.sh
|
||||
./run_tests.sh -integration test/integration -- -k "${{ matrix.subset }}"
|
||||
working-directory: 'galaxy root'
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: Integration test results (${{ matrix.python-version }}, ${{ matrix.subset }})
|
||||
path: 'galaxy root/run_integration_tests.html'
|
||||
|
||||
@@ -82,7 +82,7 @@ pyparsing = "*"
|
||||
"Fabric3" = "*"
|
||||
paramiko = "*"
|
||||
cloudbridge = "*"
|
||||
social_auth_core = {version = "==3.3.0", extras = ['openidconnect']}
|
||||
social-auth-core = {version = "==3.3.0", extras = ['openidconnect']}
|
||||
cloudauthz = "==0.6.0"
|
||||
gxformat2 = "*"
|
||||
refgenconf = ">=0.7.0"
|
||||
|
||||
@@ -94,10 +94,13 @@ def _json_wrap_input(input, value_wrapper, profile, handle_files="skip"):
|
||||
elif input_type == "boolean":
|
||||
json_value = _cast_if_not_none(value_wrapper, bool)
|
||||
elif input_type == "select":
|
||||
if input.multiple and packaging.version.parse(str(profile)) >= packaging.version.parse('20.05'):
|
||||
json_value = [_ for _ in _cast_if_not_none(value_wrapper.value, list)]
|
||||
else:
|
||||
if packaging.version.parse(str(profile)) < packaging.version.parse('20.05'):
|
||||
json_value = _cast_if_not_none(value_wrapper, str)
|
||||
else:
|
||||
if input.multiple:
|
||||
json_value = [str(_) for _ in _cast_if_not_none(value_wrapper.value, list)]
|
||||
else:
|
||||
json_value = _cast_if_not_none(value_wrapper.value, str)
|
||||
elif input_type == "data_column":
|
||||
# value is a SelectToolParameterWrapper()
|
||||
if input.multiple:
|
||||
|
||||
@@ -9,7 +9,7 @@ parsley
|
||||
numpy<=1.16
|
||||
pycryptodome
|
||||
pysam
|
||||
social_auth_core
|
||||
social-auth-core[openidconnect]==3.3.0
|
||||
SQLAlchemy
|
||||
sqlalchemy-migrate
|
||||
sqlalchemy-utils
|
||||
|
||||
@@ -27,8 +27,8 @@ if test_case == "1":
|
||||
assert_equals(as_dict["inttest"], 12456)
|
||||
assert_equals(as_dict["floattest"], 6.789)
|
||||
assert_equals(as_dict["radio_select"], "a_radio")
|
||||
assert_equals(as_dict["optional_select"], None)
|
||||
assert_equals(as_dict["optional_multiple_select"], [])
|
||||
assert_equals(as_dict["optional_select"], "None")
|
||||
assert_equals(as_dict["optional_multiple_select"], "None")
|
||||
assert_equals(as_dict["repeat"][0]["r"], "000000")
|
||||
assert_equals(as_dict["repeat"][1]["r"], "FFFFFF")
|
||||
assert_equals(as_dict["cond"]["more_text"], "fdefault")
|
||||
@@ -43,7 +43,7 @@ elif test_case == "2":
|
||||
assert_equals(as_dict["floattest"], 1.0)
|
||||
assert_equals(as_dict["radio_select"], "a_radio")
|
||||
assert_equals(as_dict["optional_select"], "a")
|
||||
assert_equals(as_dict["optional_multiple_select"], ['a', 'b'])
|
||||
assert_equals(as_dict["optional_multiple_select"], 'a,b')
|
||||
assert_equals(as_dict["repeat"][0]["r"], "000000")
|
||||
assert_equals(as_dict["cond"]["cond_test"], "second")
|
||||
assert_equals(as_dict["cond"]["more_text"], "sdefault")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- test if profile version of inputs json generation works, i.e.
|
||||
- multiple selects get comma separated string (lists >= 20.05)
|
||||
- empty optional selects get "None" ([] >= 20.05) -->
|
||||
<tool id="inputs_as_json" name="inputs_as_json" profile="20.01" version="1.0.0">
|
||||
<tool id="inputs_as_json_profile" name="inputs_as_json_profile" profile="20.05" version="1.0.0">
|
||||
<command detect_errors="exit_code"><![CDATA[
|
||||
cat inputs.json &&
|
||||
python $check_inputs inputs.json $test_case
|
||||
@@ -30,8 +30,8 @@ if test_case == "1":
|
||||
assert_equals(as_dict["inttest"], 12456)
|
||||
assert_equals(as_dict["floattest"], 6.789)
|
||||
assert_equals(as_dict["radio_select"], "a_radio")
|
||||
assert_equals(as_dict["optional_select"], "None")
|
||||
assert_equals(as_dict["optional_multiple_select"], "None")
|
||||
assert_equals(as_dict["optional_select"], None)
|
||||
assert_equals(as_dict["optional_multiple_select"], [])
|
||||
assert_equals(as_dict["repeat"][0]["r"], "000000")
|
||||
assert_equals(as_dict["repeat"][1]["r"], "FFFFFF")
|
||||
assert_equals(as_dict["cond"]["more_text"], "fdefault")
|
||||
@@ -46,7 +46,7 @@ elif test_case == "2":
|
||||
assert_equals(as_dict["floattest"], 1.0)
|
||||
assert_equals(as_dict["radio_select"], "a_radio")
|
||||
assert_equals(as_dict["optional_select"], "a")
|
||||
assert_equals(as_dict["optional_multiple_select"], 'a,b')
|
||||
assert_equals(as_dict["optional_multiple_select"], ['a', 'b'])
|
||||
assert_equals(as_dict["repeat"][0]["r"], "000000")
|
||||
assert_equals(as_dict["cond"]["cond_test"], "second")
|
||||
assert_equals(as_dict["cond"]["more_text"], "sdefault")
|
||||
|
||||
Reference in New Issue
Block a user