[ci] Update ci config to reduce javascript test time and some of cypress. (#6016)
* try travis config * try more complex config * fix config * add cache and stages * separate cache * swap order * fix redis * remove env * add cypress * adjust caching * reduce cache * change order of execution * change order again * change node version * install yarn via curl * update cypress command * update cypress command * adjust cache and node version * do not install yarn * add npm cache * remove export * remove commented code * change order of jobs * fix indent
This commit is contained in:
parent
f889798688
commit
50c701c0e8
104
.travis.yml
104
.travis.yml
|
|
@ -1,44 +1,72 @@
|
|||
language: python
|
||||
python:
|
||||
- 2.7
|
||||
- 3.6
|
||||
services:
|
||||
- mysql
|
||||
- postgres
|
||||
- redis-server
|
||||
cache:
|
||||
- pip
|
||||
matrix:
|
||||
pip: true
|
||||
jobs:
|
||||
include:
|
||||
- python: 2.7
|
||||
env: TOXENV=flake8
|
||||
- python: 2.7
|
||||
env: TOXENV=py27-mysql
|
||||
- python: 2.7
|
||||
env: TOXENV=py27-sqlite
|
||||
- python: 2.7
|
||||
env: TOXENV=pylint
|
||||
- python: 3.6
|
||||
env: TOXENV=flake8
|
||||
- python: 3.6
|
||||
env: TOXENV=javascript
|
||||
- python: 3.6
|
||||
env: TOXENV=py36-postgres
|
||||
- python: 3.6
|
||||
env: TOXENV=py36-sqlite
|
||||
- python: 3.6
|
||||
env: TOXENV=pylint
|
||||
- python: 3.6
|
||||
- language: python
|
||||
python: 3.6
|
||||
env: TOXENV=cypress
|
||||
exclude:
|
||||
- python: 2.7
|
||||
- python: 3.6
|
||||
before_script:
|
||||
- mysql -u root -e "DROP DATABASE IF EXISTS superset; CREATE DATABASE superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci"
|
||||
- mysql -u root -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED BY 'mysqluserpassword';"
|
||||
- mysql -u root -e "GRANT ALL ON superset.* TO 'mysqluser'@'localhost';"
|
||||
- psql -U postgres -c "CREATE DATABASE superset;"
|
||||
- psql -U postgres -c "CREATE USER postgresuser WITH PASSWORD 'pguserpassword';"
|
||||
cache:
|
||||
pip: true
|
||||
yarn: true
|
||||
directories:
|
||||
- ~/.npm
|
||||
- ~/.cache
|
||||
services:
|
||||
- redis-server
|
||||
before_install:
|
||||
- nvm install 8.9
|
||||
- language: python
|
||||
python: 2.7
|
||||
env: TOXENV=flake8
|
||||
- language: python
|
||||
python: 2.7
|
||||
env: TOXENV=py27-sqlite
|
||||
services:
|
||||
- redis-server
|
||||
- language: python
|
||||
python: 2.7
|
||||
env: TOXENV=py27-mysql
|
||||
services:
|
||||
- mysql
|
||||
- redis-server
|
||||
before_script:
|
||||
- mysql -u root -e "DROP DATABASE IF EXISTS superset; CREATE DATABASE superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci"
|
||||
- mysql -u root -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED BY 'mysqluserpassword';"
|
||||
- mysql -u root -e "GRANT ALL ON superset.* TO 'mysqluser'@'localhost';"
|
||||
- language: python
|
||||
python: 2.7
|
||||
env: TOXENV=pylint
|
||||
- language: node_js
|
||||
node_js: 8.9
|
||||
cache:
|
||||
yarn: true
|
||||
before_install:
|
||||
- cd superset/assets
|
||||
install:
|
||||
- yarn install --frozen-lockfile
|
||||
script:
|
||||
- npm run lint
|
||||
- npm run cover
|
||||
- language: python
|
||||
python: 3.6
|
||||
env: TOXENV=flake8
|
||||
- language: python
|
||||
python: 3.6
|
||||
env: TOXENV=py36-sqlite
|
||||
services:
|
||||
- redis-server
|
||||
- language: python
|
||||
python: 3.6
|
||||
env: TOXENV=py36-postgres
|
||||
services:
|
||||
- postgres
|
||||
- redis-server
|
||||
before_script:
|
||||
- psql -U postgres -c "CREATE DATABASE superset;"
|
||||
- psql -U postgres -c "CREATE USER postgresuser WITH PASSWORD 'pguserpassword';"
|
||||
- language: python
|
||||
python: 3.6
|
||||
env: TOXENV=pylint
|
||||
install:
|
||||
- pip install --upgrade pip
|
||||
- pip install codecov tox
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@ superset/bin/superset runserver &
|
|||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
npm install -g yarn
|
||||
yarn
|
||||
yarn install --frozen-lockfile
|
||||
npm run build
|
||||
npm run cypress run --record
|
||||
npm run cypress run
|
||||
kill %1
|
||||
|
|
|
|||
Loading…
Reference in New Issue