fix(travis): Refactor .travis.yml
This commit is contained in:
parent
3fa112d8a7
commit
f397acc936
24
.travis.yml
24
.travis.yml
@ -5,6 +5,10 @@ python:
|
||||
- "2.7"
|
||||
- "3.6"
|
||||
|
||||
env:
|
||||
- TEST_TYPE=Server Side Test
|
||||
- TEST_TYPE=Patch Test
|
||||
|
||||
services:
|
||||
- mysql
|
||||
|
||||
@ -40,18 +44,8 @@ before_script:
|
||||
- bench start &
|
||||
- sleep 10
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: test
|
||||
script:
|
||||
- set -e
|
||||
- bench run-tests --app erpnext --coverage
|
||||
after_script:
|
||||
- coveralls -b apps/erpnext -d ../../sites/.coverage
|
||||
env: Server Side Test
|
||||
- # stage
|
||||
script:
|
||||
- wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
|
||||
- bench --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz --mariadb-root-password travis
|
||||
- bench migrate
|
||||
env: Patch Testing
|
||||
script:
|
||||
- $TRAVIS_BUILD_DIR/travis/run-tests.sh
|
||||
|
||||
after_script:
|
||||
- coveralls -b apps/erpnext -d ../../sites/.coverage
|
||||
|
12
travis/run-tests.sh
Normal file
12
travis/run-tests.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ $TEST_TYPE == 'Server Side Test' ]]; then
|
||||
bench run-tests --app erpnext --coverage
|
||||
|
||||
elif [[ $TEST_TYPE == 'Patch Test' ]]; then
|
||||
wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
|
||||
bench --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz --mariadb-root-password travis
|
||||
bench migrate
|
||||
fi
|
Loading…
Reference in New Issue
Block a user