2019-01-22 11:21:13 -05:00
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership.
|
|
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
# (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
2020-08-06 15:07:22 -04:00
|
|
|
|
|
|
|
# Remember to start celery workers to run celery tests, e.g.
|
2021-06-08 23:18:55 -04:00
|
|
|
# celery --app=superset.tasks.celery_app:app worker -Ofair -c 2
|
2016-06-09 21:05:58 -04:00
|
|
|
[testenv]
|
2020-11-10 18:51:47 -05:00
|
|
|
basepython = python3.8
|
|
|
|
ignore_basepython_conflict = true
|
2018-04-10 18:59:44 -04:00
|
|
|
commands =
|
2020-08-10 12:59:34 -04:00
|
|
|
superset db upgrade
|
|
|
|
superset init
|
2020-06-29 18:36:06 -04:00
|
|
|
# use -s to be able to use break pointers.
|
|
|
|
# no args or tests/* can be passed as an argument to run all tests
|
2020-08-27 12:49:18 -04:00
|
|
|
pytest -s {posargs}
|
2016-06-09 21:05:58 -04:00
|
|
|
deps =
|
2020-08-04 22:31:52 -04:00
|
|
|
-rrequirements/testing.txt
|
2018-04-10 18:59:44 -04:00
|
|
|
setenv =
|
|
|
|
PYTHONPATH = {toxinidir}
|
2020-10-14 10:54:31 -04:00
|
|
|
SUPERSET_TESTENV = true
|
2018-04-10 18:59:44 -04:00
|
|
|
SUPERSET_CONFIG = tests.superset_test_config
|
|
|
|
SUPERSET_HOME = {envtmpdir}
|
2020-05-18 10:37:25 -04:00
|
|
|
mysql: SUPERSET__SQLALCHEMY_DATABASE_URI = mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8
|
|
|
|
postgres: SUPERSET__SQLALCHEMY_DATABASE_URI = postgresql+psycopg2://superset:superset@localhost/test
|
|
|
|
sqlite: SUPERSET__SQLALCHEMY_DATABASE_URI = sqlite:////{envtmpdir}/superset.db
|
2020-08-06 15:07:22 -04:00
|
|
|
mysql-presto: SUPERSET__SQLALCHEMY_DATABASE_URI = mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8
|
2020-08-27 12:49:18 -04:00
|
|
|
# docker run -p 8080:8080 --name presto prestosql/presto
|
2020-08-06 15:07:22 -04:00
|
|
|
mysql-presto: SUPERSET__SQLALCHEMY_EXAMPLES_URI = presto://localhost:8080/memory/default
|
2020-08-27 12:49:18 -04:00
|
|
|
# based on https://github.com/big-data-europe/docker-hadoop
|
2020-09-26 17:53:41 -04:00
|
|
|
# clone the repo & run docker-compose up -d to test locally
|
2020-08-27 12:49:18 -04:00
|
|
|
mysql-hive: SUPERSET__SQLALCHEMY_DATABASE_URI = mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8
|
|
|
|
mysql-hive: SUPERSET__SQLALCHEMY_EXAMPLES_URI = hive://localhost:10000/default
|
|
|
|
# make sure that directory is accessible by docker
|
|
|
|
hive: UPLOAD_FOLDER = /tmp/.superset/app/static/uploads/
|
2020-08-10 12:59:34 -04:00
|
|
|
usedevelop = true
|
2020-11-10 18:51:47 -05:00
|
|
|
allowlist_externals =
|
2018-01-11 00:46:10 -05:00
|
|
|
npm
|
2020-11-10 18:51:47 -05:00
|
|
|
pkill
|
2018-04-10 18:59:44 -04:00
|
|
|
|
2020-11-10 18:51:47 -05:00
|
|
|
[testenv:cypress]
|
|
|
|
setenv =
|
|
|
|
PYTHONPATH = {toxinidir}
|
|
|
|
SUPERSET_TESTENV = true
|
|
|
|
SUPERSET_CONFIG = tests.superset_test_config
|
|
|
|
SUPERSET_HOME = {envtmpdir}
|
|
|
|
ENABLE_REACT_CRUD_VIEWS = true
|
2018-09-06 17:55:48 -04:00
|
|
|
commands =
|
2018-12-21 13:24:49 -05:00
|
|
|
npm install -g npm@'>=6.5.0'
|
|
|
|
pip install -e {toxinidir}/
|
2020-11-10 18:51:47 -05:00
|
|
|
{toxinidir}/superset-frontend/cypress_build.sh
|
|
|
|
commands_post =
|
|
|
|
pkill -if "python {envbindir}/flask"
|
|
|
|
|
|
|
|
[testenv:cypress-dashboard]
|
2018-11-15 15:26:33 -05:00
|
|
|
setenv =
|
|
|
|
PYTHONPATH = {toxinidir}
|
2020-11-10 18:51:47 -05:00
|
|
|
SUPERSET_TESTENV = true
|
2018-11-15 15:26:33 -05:00
|
|
|
SUPERSET_CONFIG = tests.superset_test_config
|
|
|
|
SUPERSET_HOME = {envtmpdir}
|
2020-11-10 18:51:47 -05:00
|
|
|
ENABLE_REACT_CRUD_VIEWS = true
|
|
|
|
commands =
|
|
|
|
npm install -g npm@'>=6.5.0'
|
|
|
|
pip install -e {toxinidir}/
|
|
|
|
{toxinidir}/superset-frontend/cypress_build.sh dashboard
|
|
|
|
commands_post =
|
|
|
|
pkill -if "python {envbindir}/flask"
|
2018-11-15 15:26:33 -05:00
|
|
|
|
|
|
|
[testenv:cypress-explore]
|
2020-11-10 18:51:47 -05:00
|
|
|
setenv =
|
|
|
|
PYTHONPATH = {toxinidir}
|
|
|
|
SUPERSET_TESTENV = true
|
|
|
|
SUPERSET_CONFIG = tests.superset_test_config
|
|
|
|
SUPERSET_HOME = {envtmpdir}
|
|
|
|
ENABLE_REACT_CRUD_VIEWS = true
|
2018-11-15 15:26:33 -05:00
|
|
|
commands =
|
2018-12-21 13:24:49 -05:00
|
|
|
npm install -g npm@'>=6.5.0'
|
|
|
|
pip install -e {toxinidir}/
|
2020-02-09 20:53:56 -05:00
|
|
|
{toxinidir}/superset-frontend/cypress_build.sh explore
|
2020-11-10 18:51:47 -05:00
|
|
|
commands_post =
|
|
|
|
pkill -if "python {envbindir}/flask"
|
|
|
|
|
|
|
|
[testenv:cypress-sqllab]
|
2018-11-15 15:26:33 -05:00
|
|
|
setenv =
|
|
|
|
PYTHONPATH = {toxinidir}
|
2020-11-10 18:51:47 -05:00
|
|
|
SUPERSET_TESTENV = true
|
2018-11-15 15:26:33 -05:00
|
|
|
SUPERSET_CONFIG = tests.superset_test_config
|
|
|
|
SUPERSET_HOME = {envtmpdir}
|
2020-11-10 18:51:47 -05:00
|
|
|
ENABLE_REACT_CRUD_VIEWS = true
|
2018-11-15 15:26:33 -05:00
|
|
|
commands =
|
2018-12-21 13:24:49 -05:00
|
|
|
npm install -g npm@'>=6.5.0'
|
|
|
|
pip install -e {toxinidir}/
|
2020-02-09 20:53:56 -05:00
|
|
|
{toxinidir}/superset-frontend/cypress_build.sh sqllab
|
2020-11-10 18:51:47 -05:00
|
|
|
commands_post =
|
|
|
|
pkill -if "python {envbindir}/flask"
|
|
|
|
|
|
|
|
[testenv:cypress-sqllab-backend-persist]
|
2018-09-06 17:55:48 -04:00
|
|
|
setenv =
|
|
|
|
PYTHONPATH = {toxinidir}
|
2020-11-10 18:51:47 -05:00
|
|
|
SUPERSET_TESTENV = true
|
2018-09-06 17:55:48 -04:00
|
|
|
SUPERSET_CONFIG = tests.superset_test_config
|
|
|
|
SUPERSET_HOME = {envtmpdir}
|
2020-11-10 18:51:47 -05:00
|
|
|
ENABLE_REACT_CRUD_VIEWS = true
|
2019-11-14 12:44:57 -05:00
|
|
|
commands =
|
|
|
|
npm install -g npm@'>=6.5.0'
|
|
|
|
pip install -e {toxinidir}/
|
2020-02-09 20:53:56 -05:00
|
|
|
{toxinidir}/superset-frontend/cypress_build.sh sqllab
|
2020-11-10 18:51:47 -05:00
|
|
|
commands_post =
|
|
|
|
pkill -if "python {envbindir}/flask"
|
2019-11-14 12:44:57 -05:00
|
|
|
|
2018-04-10 18:59:44 -04:00
|
|
|
[testenv:eslint]
|
2020-02-09 20:53:56 -05:00
|
|
|
changedir = {toxinidir}/superset-frontend
|
2016-06-09 21:05:58 -04:00
|
|
|
commands =
|
2018-04-10 18:59:44 -04:00
|
|
|
npm run lint
|
|
|
|
deps =
|
2016-06-09 21:05:58 -04:00
|
|
|
|
2019-10-18 17:44:27 -04:00
|
|
|
[testenv:fossa]
|
|
|
|
commands =
|
|
|
|
{toxinidir}/scripts/fossa.sh
|
|
|
|
deps =
|
|
|
|
passenv = *
|
|
|
|
|
2016-09-20 17:14:49 -04:00
|
|
|
[testenv:javascript]
|
2018-01-11 00:46:10 -05:00
|
|
|
commands =
|
2018-12-21 13:24:49 -05:00
|
|
|
npm install -g npm@'>=6.5.0'
|
2020-02-09 20:53:56 -05:00
|
|
|
{toxinidir}/superset-frontend/js_build.sh
|
2018-04-10 18:59:44 -04:00
|
|
|
deps =
|
2016-09-20 17:14:49 -04:00
|
|
|
|
2019-03-20 00:14:12 -04:00
|
|
|
[testenv:license-check]
|
|
|
|
commands =
|
|
|
|
{toxinidir}/scripts/check_license.sh
|
|
|
|
passenv = *
|
|
|
|
whitelist_externals =
|
|
|
|
{toxinidir}/scripts/check_license.sh
|
2019-07-27 11:33:03 -04:00
|
|
|
deps =
|
2019-03-20 00:14:12 -04:00
|
|
|
|
2020-08-04 22:31:52 -04:00
|
|
|
[testenv:pre-commit]
|
2019-08-08 00:08:10 -04:00
|
|
|
commands =
|
2020-08-04 22:31:52 -04:00
|
|
|
pre-commit run --all-files
|
2019-08-08 00:08:10 -04:00
|
|
|
deps =
|
2020-08-04 22:31:52 -04:00
|
|
|
-rrequirements/integration.txt
|
|
|
|
skip_install = true
|
2019-08-08 00:08:10 -04:00
|
|
|
|
2017-04-04 00:53:06 -04:00
|
|
|
[testenv:pylint]
|
|
|
|
commands =
|
2018-04-28 23:08:09 -04:00
|
|
|
pylint superset
|
2018-04-10 18:59:44 -04:00
|
|
|
deps =
|
2020-08-04 22:31:52 -04:00
|
|
|
-rrequirements/testing.txt
|
2016-06-09 21:05:58 -04:00
|
|
|
|
2020-04-24 01:51:33 -04:00
|
|
|
[testenv:thumbnails]
|
|
|
|
setenv =
|
|
|
|
SUPERSET_CONFIG = tests.superset_test_config_thumbnails
|
2019-12-03 04:42:57 -05:00
|
|
|
deps =
|
2020-08-04 22:31:52 -04:00
|
|
|
-rrequirements/testing.txt
|
2019-12-03 04:42:57 -05:00
|
|
|
|
2018-04-10 18:59:44 -04:00
|
|
|
[tox]
|
|
|
|
envlist =
|
2018-11-15 15:26:33 -05:00
|
|
|
cypress-dashboard
|
|
|
|
cypress-explore
|
|
|
|
cypress-sqllab
|
2019-11-14 12:44:57 -05:00
|
|
|
cypress-sqllab-backend-persist
|
2018-04-10 18:59:44 -04:00
|
|
|
eslint
|
2020-04-24 01:51:33 -04:00
|
|
|
fossa
|
2018-04-10 18:59:44 -04:00
|
|
|
javascript
|
2020-04-24 01:51:33 -04:00
|
|
|
license-check
|
2020-08-04 22:31:52 -04:00
|
|
|
pre-commit
|
2018-07-18 18:55:01 -04:00
|
|
|
pylint
|
2018-04-10 18:59:44 -04:00
|
|
|
skipsdist = true
|