mirror of https://github.com/pelias/api.git
Diana Shkolnikov
10 years ago
3 changed files with 31 additions and 2 deletions
@ -1,4 +1,7 @@
|
||||
language: node_js |
||||
script: "npm run unit" |
||||
script: |
||||
- npm run unit |
||||
- if [ "${TRAVIS_BRANCH}" == "production" ]; then npm run acceptance-prod fi; |
||||
- if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then npm run acceptance-stage fi; |
||||
node_js: |
||||
- "0.10" |
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash |
||||
|
||||
set -ex |
||||
|
||||
if [ -d test/acceptance/acceptance-tests ]; then |
||||
rm -rf test/acceptance/acceptance-tests |
||||
fi |
||||
|
||||
if [ "$1" == "production" ]; then |
||||
git clone -b production --single-branch https://github.com/pelias/acceptance-tests.git test/acceptance/acceptance-tests |
||||
else |
||||
git clone https://github.com/pelias/acceptance-tests.git test/acceptance/acceptance-tests |
||||
fi |
||||
|
||||
cd test/acceptance/acceptance-tests |
||||
npm install |
||||
|
||||
if [ "$1" == "production" ]; then |
||||
node test -e prod |
||||
else |
||||
node test -e stage |
||||
fi |
||||
|
||||
cd ../../../ && rm -rf test/acceptance/acceptance-tests |
Loading…
Reference in new issue