diff --git a/.travis.yml b/.travis.yml index ba513a33b..2d41c1dbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: python +sudo: true matrix: include: - python: 3.7 @@ -13,11 +14,17 @@ matrix: env: TOX_ENV=py37-unit-nonredundant-noclientbuild-noshed-gx-master - python: 3.7 env: TOX_ENV=py37-unit-diagnostic-serveshedcmd-gx-master + - python: 3.7 + env: TOX_ENV=py37-gxwf_test_test allow_failures: - env: TOX_ENV=py37-lint_docstrings - env: TOX_ENV=py37-unit-diagnostic-serveshedcmd-gx-master + - env: TOX_ENV=py37-gxwf_test_test PLANEMO_TEST_STYLE=docker_test install: - pip install tox script: tox -e $TOX_ENV +services: + - postgresql + - docker diff --git a/Makefile b/Makefile index 38cd75100..9a08344da 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,9 @@ test: ## run tests with the default Python (faster than tox) quick-test: ## run quickest tests with the default Python $(IN_VENV) PLANEMO_SKIP_SLOW_TESTS=1 PLANEMO_SKIP_GALAXY_TESTS=1 pytest $(TESTS) +gxwf-test-test: ## run test of workflow testing script + bash $(BUILD_SCRIPTS_DIR)/test_workflow_tests.sh + tox: ## run tests with tox in the specified ENV, defaults to py27 $(IN_VENV) tox -e $(ENV) -- $(ARGS) diff --git a/scripts/test_workflow_tests.sh b/scripts/test_workflow_tests.sh new file mode 100644 index 000000000..9eb0a7aef --- /dev/null +++ b/scripts/test_workflow_tests.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Ensure working directory is planemo project. +SCRIPTS_DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIRECTORY="${SCRIPTS_DIRECTORY}/.." + +TEMP_DIRECTORY=`mktemp -d 2>/dev/null || mktemp -d -t 'planemowftest'` +cp "$SCRIPTS_DIRECTORY/run_galaxy_workflow_tests.sh" "$TEMP_DIRECTORY" +cp "$PROJECT_DIRECTORY/tests/data/"wf4* "$TEMP_DIRECTORY" +cp "$PROJECT_DIRECTORY/tests/data/1.bed" "$TEMP_DIRECTORY" + +cd $PROJECT_DIRECTORY + +# Build Planemo wheel. +make dist + +# Test against wheel. +export PLANEMO_TARGET="$PROJECT_DIRECTORY/dist/planemo*whl" + +cd $TEMP_DIRECTORY +ls +bash run_galaxy_workflow_tests.sh "wf4-distro-tools.gxwf.yml" diff --git a/tox.ini b/tox.ini index a0d836b08..ef323cd42 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{36}-lint, py36-unit-quick, py36-lint_docstrings, py36-lint_docs, py{36,37}-unit +envlist = py{36}-lint, py36-unit-quick, py36-lint_docstrings, py36-lint_docs, py{36,37}-unit, py36-gxwf_test_test source_dir = planemo test_dir = tests @@ -10,12 +10,14 @@ commands = lint_docstrings: flake8 --ignore='D107,D401,D105' {[tox]source_dir} unit: pytest {env:PYTEST_FAIL_FAIL:} {env:PYTEST_CAPTURE:} -m {env:PYTEST_MARK:""} {env:PYTEST_TARGET:{[tox]test_dir}} {posargs} mypy: mypy {[tox]source_dir} {posargs} + gxwf_test_test: make setup-venv gxwf-test-test passenv = PLANEMO_* PG* HOME DOCS + deps = lint: flake8-import-order lint,lint_docstrings: flake8 @@ -27,6 +29,7 @@ deps = unit: coverage unit: flask mypy: mypy + setenv = gx: PYTEST_MARK="tests_galaxy_branch" diagnostic: PLANEMO_TEST_VERBOSE=1 @@ -54,9 +57,15 @@ setenv = 2005: PLANEMO_TEST_GALAXY_BRANCH=release_20.05 2001: PLANEMO_TEST_GALAXY_BRANCH=release_20.01 skip_install = +<<<<<<< HEAD doc_test,lint,lint_docs,lint_docstrings,mypy: True +======= + doc_test,lint,lint_docs,lint_docstrings,gxwf_test_test: True +>>>>>>> 08a8ee74... Tests for workflow testing script. whitelist_externals = lint_docs: make + gxwf_test_test: make + [testenv:doc_test] commands = bash scripts/run_doc_test.sh