Skip to content

Commit

Permalink
split into three
Browse files Browse the repository at this point in the history
  • Loading branch information
timifasubaa committed Nov 13, 2018
1 parent d32f635 commit 741c06f
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 21 deletions.
28 changes: 27 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,33 @@ jobs:
include:
- language: python
python: 3.6
env: TOXENV=cypress_dashboard
env: TOXENV=cypress-dashboard
cache:
pip: true
yarn: true
directories:
- ~/.npm
- ~/.cache
services:
- redis-server
before_install:
- nvm install 8.9
- language: python
python: 3.6
env: TOXENV=cypress-explore
cache:
pip: true
yarn: true
directories:
- ~/.npm
- ~/.cache
services:
- redis-server
before_install:
- nvm install 8.9
- language: python
python: 3.6
env: TOXENV=cypress-sqllab
cache:
pip: true
yarn: true
Expand Down
Empty file added cypress.json
Empty file.
2 changes: 2 additions & 0 deletions superset/assets/cypress.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"baseUrl": "http://localhost:8081",
"videoUploadOnPasses": false,
"video": false,
"ignoreTestFiles": ["**/!(*.test.js)"],
"projectId": "fbf96q",
"defaultCommandTimeout": 10000,
"viewportWidth": 1280,
"viewportHeight": 800
}
22 changes: 8 additions & 14 deletions superset/assets/cypress_build.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
#!/bin/bash
set -e

<<<<<<< HEAD
superset/bin/superset db upgrade
superset/bin/superset load_test_users
superset/bin/superset load_examples
superset/bin/superset init
flask run -p 8081 --with-threads --reload --debugger &

=======
>>>>>>> split into three
cd "$(dirname "$0")"

yarn install --frozen-lockfile & superset/bin/superset db upgrade
superset/bin/superset load_test_users & superset/bin/superset load_examples
superset/bin/superset init
npm run build & flask run -p 8081 --with-threads --reload --debugger &
#run all the python steps in a background process
(time /home/travis/build/apache/incubator-superset/superset/bin/superset db upgrade; time /home/travis/build/apache/incubator-superset/superset/bin/superset load_test_users; /home/travis/build/apache/incubator-superset/superset/bin/superset load_examples; time /home/travis/build/apache/incubator-superset/superset/bin/superset init; echo "[completed python build steps]"; flask run -p 8081 --with-threads --reload --debugger) &

#block on the longer running javascript process
(time yarn install --frozen-lockfile; time npm run build; echo "[completed js build steps]")

CYPRESS_PATH='cypress/integration/'${1}'/*'
time npm run cypress run -- --spec "$CYPRESS_PATH" --record false --config video=false

npm run cypress run -- --spec 'cypress/integration/explore/*' & npm run cypress run -- --spec 'cypress/integration/dashboard/*' & npm run cypress run -- --spec 'cypress/integration/explore/*'
kill %1
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ setenv =
whitelist_externals =
npm

[testenv:cypress_dashboard]
[testenv:cypress-dashboard]
commands =
{toxinidir}/superset/assets/cypress_build.sh dashboard
setenv =
Expand All @@ -56,7 +56,7 @@ deps =
-rrequirements.txt
-rrequirements-dev.txt

[testenv:cypress_explore]
[testenv:cypress-explore]
commands =
{toxinidir}/superset/assets/cypress_build.sh explore
setenv =
Expand All @@ -67,7 +67,7 @@ deps =
-rrequirements.txt
-rrequirements-dev.txt

[testenv:cypress_sqllab]
[testenv:cypress-sqllab]
commands =
{toxinidir}/superset/assets/cypress_build.sh sqllab
setenv =
Expand Down Expand Up @@ -105,9 +105,9 @@ deps =

[tox]
envlist =
cypress_dashboard
cypress_explore
cypress_sqllab
cypress-dashboard
cypress-explore
cypress-sqllab
eslint
flake8
javascript
Expand Down

0 comments on commit 741c06f

Please sign in to comment.