Skip to content

Commit

Permalink
New travis pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
smoia committed Mar 20, 2020
1 parent c4507df commit 847cc86
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,6 @@ env:

jobs:
include:
- language: node_js
node_js: 10
cache: yarn
env:
- INSTALL_TYPE=auto-svl
- CHECK_TYPE=auto-svl
- GIT_NAME="Stefano Moia"
- GIT_EMAIL="s.moia@bcbl.eu"
- GH_USER="smoia"
script:
- npx auto shipit
before_deploy:
- git config --local user.name "${GIT_NAME}"
- git config --local user.email "${GIT_EMAIL}"
deploy:
- provider: script
script: if [ "$GH_TOKEN" != "false" ];then npx auto shipit; fi;
skip_cleanup: true
on:
branch: master
- python: 3.6
env:
- INSTALL_TYPE=sdist
Expand All @@ -49,20 +29,32 @@ jobs:
env:
- INSTALL_TYPE=wheel
- CHECK_TYPE=test
- language: node_js
node_js: 10
env:
- INSTALL_TYPE=auto-svl
- CHECK_TYPE=auto-svl
- GIT_NAME="Stefano Moia"
- GIT_EMAIL="s.moia@bcbl.eu"
- GH_USER="smoia"

before_install:
- if [ "${CHECK_TYPE}" == "auto-svl" ]; then
echo "skip pip upgrade";
CHECK_BRANCH=$( git branch | grep \*)
if [ "${CHECK_BRANCH}" == "* master" ]; then
git config --local user.name "${GIT_NAME}";
git config --local user.email "${GIT_EMAIL}";
else
echo "Not on master branch, skipping auto-svl";
fi
else
python -m pip install --upgrade pip;
fi
- if [ "${CHECK_TYPE}" == "linting" ]; then
pip install flake8;
fi
- if [ "${CHECK_TYPE}" == "test" ]; then
elif [ "${CHECK_TYPE}" == "test" ]; then
pip install "pytest>=3.6" pytest-cov coverage coveralls codecov wget;
fi
- if [ "${CHECK_TYPE}" == "docdoctest" ]; then
elif [ "${CHECK_TYPE}" == "docdoctest" ]; then
pip install "sphinx>2.0" sphinx_rtd_theme pandas sphinx-argparse;
fi

Expand All @@ -76,14 +68,18 @@ install:
python setup.py bdist_wheel;
pip install dist/*.whl;
elif [ "${INSTALL_TYPE}" == "auto-svl" ]; then
echo "skip install";
CHECK_BRANCH=$( git branch | grep \*)
if [ "${CHECK_BRANCH}" == "* master" ]; then
curl -vkL -o - https://github.com/intuit/auto/releases/download/v9.20.1/auto-linux.gz | gunzip > build/auto;
else
echo "Not on master branch, skipping auto-svl";
fi
else
false;
fi

script:
- |
if [ "${CHECK_TYPE}" == "linting" ]; then
- if [ "${CHECK_TYPE}" == "linting" ]; then
flake8 phys2bids;
elif [ "${CHECK_TYPE}" == "docdoctest" ]; then
cd docs;
Expand All @@ -96,7 +92,12 @@ script:
args="--doctest-modules --cov-report term-missing --cov=phys2bids --pyargs"
python -m pytest ${args} phys2bids;
elif [ "${CHECK_TYPE}" == "auto-svl" ]; then
echo "Doing nothing";
CHECK_BRANCH=$( git branch | grep \*)
if [ "${CHECK_BRANCH}" == "* master" ]; then
build/auto shipit;
else
echo "Not on master branch, skipping auto-svl";
fi
else
false;
fi
Expand Down

0 comments on commit 847cc86

Please sign in to comment.