Skip to content

Commit

Permalink
Adding Cypress to tox
Browse files Browse the repository at this point in the history
  • Loading branch information
michellethomas committed Sep 6, 2018
1 parent 3303fa0 commit 562e6cf
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ matrix:
env: TOXENV=py36-sqlite
- python: 3.6
env: TOXENV=pylint
- python: 3.6
env: TOXENV=cypress
exclude:
- python: 2.7
- python: 3.6
Expand Down
16 changes: 16 additions & 0 deletions superset/assets/cypress_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -e

superset/bin/superset db upgrade
superset/bin/superset load_test_users
superset/bin/superset load_examples
superset/bin/superset init
superset/bin/superset runserver &

cd "$(dirname "$0")"

npm install -g yarn
yarn
npm run build
npm run cypress run
kill %1
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ setenv =
whitelist_externals =
npm

[testenv:cypress]
commands =
{toxinidir}/superset/assets/cypress_build.sh
setenv =
PYTHONPATH = {toxinidir}
SUPERSET_CONFIG = tests.superset_test_config
SUPERSET_HOME = {envtmpdir}
deps =
-rrequirements.txt
-rrequirements-dev.txt

[testenv:eslint]
changedir = {toxinidir}/superset/assets
commands =
Expand Down Expand Up @@ -72,6 +83,7 @@ deps =

[tox]
envlist =
cypress
eslint
flake8
javascript
Expand Down

0 comments on commit 562e6cf

Please sign in to comment.